Merge pull request #17015 from backstage/auth/fix-guest-custom

Fix guest/custom auth
This commit is contained in:
Eric Peterson
2023-03-22 14:42:57 +01:00
committed by GitHub
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 = () => {