changeset tweak

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-09-21 13:49:34 +02:00
parent cc538eccc2
commit bf79a1cb77
2 changed files with 14 additions and 6 deletions
+7 -1
View File
@@ -2,4 +2,10 @@
'@backstage/plugin-user-settings': minor
---
**BREAKING** Fixed settings page showing providers as logged out when the user is using more than one provider, and displayed some additional login information.
**BREAKING**: The `apiRef` passed to `ProviderSettingsItem` now needs to
implement `ProfileInfoApi & SessionApi`, rather than just the latter. This is
unlikely to have an effect on most users though, since the builtin auth
providers generally implement both.
Fixed settings page showing providers as logged out when the user is using more
than one provider, and displayed some additional login information.
@@ -60,11 +60,13 @@ export const ProviderSettingsItem = (props: {
api
.getProfile({ optional: true })
.then((profileResponse: ProfileInfo | undefined) => {
if (sessionState === SessionState.SignedIn) {
setSignedIn(true);
}
if (profileResponse) {
setProfile(profileResponse);
if (!didCancel) {
if (sessionState === SessionState.SignedIn) {
setSignedIn(true);
}
if (profileResponse) {
setProfile(profileResponse);
}
}
});
}