backend-next: use stringifyEntityRef in github provider module

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-02-22 17:33:33 +01:00
parent d2600ca208
commit db62da78d9
3 changed files with 11 additions and 1 deletions
+1
View File
@@ -28,6 +28,7 @@
"@backstage/backend-defaults": "workspace:^",
"@backstage/backend-plugin-api": "workspace:^",
"@backstage/backend-tasks": "workspace:^",
"@backstage/catalog-model": "workspace:^",
"@backstage/plugin-adr-backend": "workspace:^",
"@backstage/plugin-app-backend": "workspace:^",
"@backstage/plugin-auth-backend": "workspace:^",
@@ -15,6 +15,10 @@
*/
import { createBackendModule } from '@backstage/backend-plugin-api';
import {
DEFAULT_NAMESPACE,
stringifyEntityRef,
} from '@backstage/catalog-model';
import { githubAuthenticator } from '@backstage/plugin-auth-backend-module-github-provider';
import {
authProvidersExtensionPoint,
@@ -40,7 +44,11 @@ export default createBackendModule({
);
}
const userEntityRef = `user:default/${userId}`;
const userEntityRef = stringifyEntityRef({
kind: 'User',
name: userId,
namespace: DEFAULT_NAMESPACE,
});
return ctx.issueToken({
claims: {
+1
View File
@@ -27355,6 +27355,7 @@ __metadata:
"@backstage/backend-defaults": "workspace:^"
"@backstage/backend-plugin-api": "workspace:^"
"@backstage/backend-tasks": "workspace:^"
"@backstage/catalog-model": "workspace:^"
"@backstage/cli": "workspace:^"
"@backstage/plugin-adr-backend": "workspace:^"
"@backstage/plugin-app-backend": "workspace:^"