{
if (!email || !password) {
sendUserToast('Please fill in both email and password', true)
@@ -144,7 +149,10 @@
async function loadLogins() {
const allLogins = await OauthService.listOauthLogins()
- logins = allLogins.oauth
+ 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)
@@ -205,26 +213,26 @@
{/each}
{:else}
- {#each providers as { type, icon, name }}
- {#if logins?.includes(type)}
+ {#each providers as { type, icon }}
+ {#if logins?.some(login => login.type === type)}
{/if}
{/each}
- {#each logins.filter((x) => !providersType?.includes(x)) as login}
+ {#each logins.filter((login) => !providersType?.includes(login.type)) as login}
{/each}
{/if}
diff --git a/frontend/src/lib/components/OAuthSetting.svelte b/frontend/src/lib/components/OAuthSetting.svelte
index 4e84f796ce..505db1c36a 100644
--- a/frontend/src/lib/components/OAuthSetting.svelte
+++ b/frontend/src/lib/components/OAuthSetting.svelte
@@ -50,6 +50,10 @@
>
{#if enabled}
+