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:
blam
2024-03-15 12:44:51 +01:00
parent b7924bb648
commit 50a331b16a
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -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({