@salesforcedevs/dx-components 1.2.7-avatar-button-2 → 1.2.7-avatar-button-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -227,6 +227,7 @@ export default class AvatarButton extends LightningElement {
|
|
|
227
227
|
private handleSsoLogin = async (event: Event) => {
|
|
228
228
|
const { userInfo } = (event as CustomEvent).detail;
|
|
229
229
|
const token = userInfo?.access_token;
|
|
230
|
+
const isAlreadyLoading = this.isLoading;
|
|
230
231
|
|
|
231
232
|
// `token` should always be defined if an SSO login occurs, but we check for extra safety
|
|
232
233
|
if (token) {
|
|
@@ -254,9 +255,10 @@ export default class AvatarButton extends LightningElement {
|
|
|
254
255
|
}
|
|
255
256
|
}
|
|
256
257
|
|
|
257
|
-
if (userInfo) {
|
|
258
|
-
|
|
259
|
-
|
|
258
|
+
if (userInfo && !isAlreadyLoading) {
|
|
259
|
+
// TODO: This sucks and we will have to raise an issue with the TBID team, but for some reason the
|
|
260
|
+
// SSO login userInfo payload is missing photos for the user, so we have to re-request it on login.
|
|
261
|
+
this.requestUserInfo();
|
|
260
262
|
}
|
|
261
263
|
|
|
262
264
|
this.isLoading = false;
|