Fix guest/custom auth

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2023-03-22 14:20:14 +01:00
parent 9e82f9ec2f
commit d0befd3fb2
2 changed files with 9 additions and 1 deletions
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Fixed a bug that could prevent auth from working when using the `guest` or `custom` auth providers.
@@ -177,7 +177,10 @@ export const useSignInProviders = (
};
const handleSignInStarted = () => {
localStorage.setItem(PROVIDER_STORAGE_KEY, provider.config!.id);
localStorage.setItem(
PROVIDER_STORAGE_KEY,
provider?.config?.id || provider.id,
);
};
const handleSignInFailure = () => {