fix: ensure invite link shows the register page. Closes #335

This commit is contained in:
jubnl
2026-04-03 03:58:44 +02:00
parent 4e10028669
commit 9afb51fcc0

View File

@@ -50,7 +50,6 @@ export default function LoginPage(): React.ReactElement {
setError('Invalid or expired invite link')
})
window.history.replaceState({}, '', window.location.pathname)
return
}
if (oidcCode) {
@@ -87,7 +86,7 @@ export default function LoginPage(): React.ReactElement {
if (config) {
setAppConfig(config)
if (!config.has_users) setMode('register')
if (config.oidc_only_mode && config.oidc_configured && config.has_users) {
if (config.oidc_only_mode && config.oidc_configured && config.has_users && !invite) {
window.location.href = '/api/auth/oidc/login'
}
}