Apply suggestions from code review
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Signed-off-by: Aramis Sennyey <159921952+aramissennyeydd@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend-module-guest-provider': patch
|
||||
'@backstage/plugin-auth-backend-module-guest-provider': minor
|
||||
---
|
||||
|
||||
Adds a new guest provider that maps guest users to actual tokens. This also shifts the default guest login to `user:development/guest` to reduce overlap with your production/real data. To change that (or set it back to the old default, use the new `auth.guestEntityRef` config key) like so,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': minor
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
`SignInPage`'s `'guest'` provider now supports the `@backstage/plugin-auth-backend-module-guest-provider` package to generate tokens. It will continue to use the old frontend-only auth as a fallback.
|
||||
|
||||
@@ -32,8 +32,8 @@ const getIdentity = async (identity: ProxiedSignInIdentity) => {
|
||||
return identityResponse;
|
||||
} catch (error) {
|
||||
if (
|
||||
error instanceof ResponseError &&
|
||||
error.cause.name === 'NotFoundError'
|
||||
error.name === 'ResponseError' &&
|
||||
(error as ResponseError).cause.name === 'NotFoundError'
|
||||
) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user