mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 17:42:45 +02:00
Allow registration on SSO only servers.
Stop using the homeserver from user defaults.
This commit is contained in:
+9
-1
@@ -74,7 +74,15 @@ class RegistrationWizard {
|
||||
/// See `AuthenticationService.getFallbackUrl`
|
||||
func registrationFlow() async throws -> RegistrationResult {
|
||||
let parameters = RegistrationParameters()
|
||||
return try await performRegistrationRequest(parameters: parameters)
|
||||
|
||||
do {
|
||||
let result = try await performRegistrationRequest(parameters: parameters)
|
||||
return result
|
||||
} catch {
|
||||
// Map M_FORBIDDEN into a registration error.
|
||||
guard let mxError = MXError(nsError: error), mxError.errcode == kMXErrCodeStringForbidden else { throw error }
|
||||
throw RegistrationError.registrationDisabled
|
||||
}
|
||||
}
|
||||
|
||||
/// Can be call to check is the desired username is available for registration on the current homeserver.
|
||||
|
||||
Reference in New Issue
Block a user