chore: use return await to make sure that the promise is settled before returning
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend-module-guest-provider': patch
|
||||
---
|
||||
|
||||
Fix issue for issuing a token when `guest` user does not exist in catalog
|
||||
@@ -46,7 +46,7 @@ export const signInAsGuestUser: (config: Config) => SignInResolver<{}> =
|
||||
'ownershipEntityRefs',
|
||||
) ?? [userRef];
|
||||
try {
|
||||
return ctx.signInWithCatalogUser({ entityRef: userRef });
|
||||
return await ctx.signInWithCatalogUser({ entityRef: userRef });
|
||||
} catch (err) {
|
||||
// We can't guarantee that a guest user exists in the catalog, so we issue a token directly,
|
||||
return ctx.issueToken({
|
||||
|
||||
Reference in New Issue
Block a user