hotfix for Backstage token generation, prefer .token over .idToken

Signed-off-by: Zach Falen <zfalen@deloitte.com>
This commit is contained in:
Zach Falen
2021-11-12 12:53:13 -07:00
parent d0ea59bee8
commit 8a60033962
2 changed files with 7 additions and 3 deletions
@@ -49,7 +49,9 @@ const Component: ProviderComponent = ({ config, onResult }) => {
userId: identity!.id,
profile: profile!,
getIdToken: () => {
return authApi.getBackstageIdentity().then(i => i!.idToken);
return authApi
.getBackstageIdentity()
.then(i => i!.token ?? i!.idToken);
},
signOut: async () => {
await authApi.signOut();