From e75c84a11dcbd4b9405df21776083500c3bb5733 Mon Sep 17 00:00:00 2001 From: "Gabriel Mowses (Mouse)" Date: Wed, 1 Apr 2026 19:59:02 -0300 Subject: [PATCH] feat: redirect to OAuth provider when selecting non-form strategy --- ux/src/components/AuthLoginPanel.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ux/src/components/AuthLoginPanel.vue b/ux/src/components/AuthLoginPanel.vue index af55f862..d13ee0f5 100644 --- a/ux/src/components/AuthLoginPanel.vue +++ b/ux/src/components/AuthLoginPanel.vue @@ -15,7 +15,7 @@ no-caps :color='str.id === state.selectedStrategyId ? `primary` : ($q.dark.isActive ? `blue-grey-9` : `grey-1`)' :text-color='str.id === state.selectedStrategyId || $q.dark.isActive ? `white` : `blue-grey-9`' - @click='state.selectedStrategyId = str.id' + @click='selectStrategy(str)' ) q-form(ref='loginForm', @submit='login') q-input( @@ -611,6 +611,17 @@ async function handleLoginResponse (resp) { } } +/** + * SELECT STRATEGY + */ +function selectStrategy (str) { + state.selectedStrategyId = str.id + // If strategy doesn't use a form (e.g. OIDC/OAuth), redirect to provider + if (!str.activeStrategy.strategy.useForm) { + window.location.assign(`/login/${str.activeStrategy.id}/redirect`) + } +} + /** * LOGIN */