mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Show fallback on authentication coordinator
This commit is contained in:
@@ -66,5 +66,24 @@ struct AuthenticationState {
|
||||
showRegistrationForm: registrationFlow != nil,
|
||||
ssoIdentityProviders: preferredLoginMode.ssoIdentityProviders ?? [])
|
||||
}
|
||||
|
||||
/// Needs authentication fallback for login or registration
|
||||
var needsFallback: Bool {
|
||||
switch preferredLoginMode {
|
||||
case .unsupported:
|
||||
return true
|
||||
default:
|
||||
break
|
||||
}
|
||||
guard let flow = registrationFlow else {
|
||||
return false
|
||||
}
|
||||
switch flow {
|
||||
case .flowResponse(let result):
|
||||
return result.needsFallback
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user