feat(idp): add keycloak-first support with authentik fallback
This commit is contained in:
@@ -5,7 +5,8 @@ export const getOidcAuthorizeUrl = (redirectUri, options = {}) =>
|
||||
params: {
|
||||
redirect_uri: redirectUri,
|
||||
login_hint: options.loginHint || undefined,
|
||||
prompt: options.prompt || undefined
|
||||
prompt: options.prompt || undefined,
|
||||
idp_hint: options.idpHint || undefined
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -97,8 +97,10 @@ async function handleOidcLogin() {
|
||||
oidcLoading.value = true
|
||||
error.value = ''
|
||||
try {
|
||||
const googleIdpHint = import.meta.env.VITE_OIDC_IDP_HINT_GOOGLE || undefined
|
||||
await redirectToOidc({
|
||||
prompt: 'select_account'
|
||||
prompt: 'select_account',
|
||||
idpHint: googleIdpHint
|
||||
})
|
||||
} catch (err) {
|
||||
error.value = err.message || '登入失敗,請稍後再試'
|
||||
|
||||
Reference in New Issue
Block a user