in ui-angular/src/app/app.component.ts [162:186]
private async onLoad() {
const urlParams = new URLSearchParams(window.location.search);
const idpParamName = 'identity_provider';
const idp = urlParams.get(idpParamName);
try {
this.model.user = await AppComponent.getUser();
// remove identity_provider query param (not needed if signed in successfully)
if (idp) {
urlParams.delete(idpParamName);
const params = urlParams.toString();
window.history.replaceState(null, null as any, window.location.pathname + (params ? '?' + params : ''));
}
await this.loadAllPets();
} catch (e) {
if (e === 'not authenticated' && idp) {
await this.signIn(idp);
}
}
}