Skip to content

Commit

Permalink
nits script lang
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Dec 25, 2024
1 parent 03694dc commit 9bdf0e6
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions frontend/src/lib/components/Login.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,21 @@
}
async function loadLogins() {
const allLogins = await OauthService.listOauthLogins()
logins = allLogins.oauth.map((login) => ({
type: login.type,
displayName: login.display_name || login.type
}))
saml = allLogins.saml
showPassword = (logins.length == 0 && !saml) || (email != undefined && email.length > 0)
try {
const allLogins = await OauthService.listOauthLogins()
logins = allLogins.oauth.map((login) => ({
type: login.type,
displayName: login.display_name || login.type
}))
saml = allLogins.saml
showPassword = (logins.length == 0 && !saml) || (email != undefined && email.length > 0)
} catch (e) {
logins = []
saml = undefined
showPassword = true
console.error('Could not load logins', e)
}
}
loadLogins()
Expand Down

0 comments on commit 9bdf0e6

Please sign in to comment.