Use the supplied token in the Custom User sign in
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Ensure that the "Custom User" sign-in makes use of supplied custom tokens, if any
|
||||
@@ -69,10 +69,11 @@ const Component: ProviderComponent = ({ onSignInSuccess }) => {
|
||||
|
||||
const { errors } = formState;
|
||||
|
||||
const handleResult = ({ userId }: Data) => {
|
||||
const handleResult = ({ userId, idToken }: Data) => {
|
||||
onSignInSuccess(
|
||||
UserIdentity.fromLegacy({
|
||||
userId,
|
||||
getIdToken: idToken !== undefined ? async () => idToken : undefined,
|
||||
profile: {
|
||||
email: `${userId}@example.com`,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user