mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 08:03:50 +02:00
Privacy: Allow email registration when no IS: Make is_url optional in the next_link of the validation email
#2657
This commit is contained in:
@@ -969,16 +969,31 @@
|
||||
}
|
||||
|
||||
// Check validity of the required parameters
|
||||
if (!homeserverURL.length || !identityURL.length || !clientSecret.length || !sid.length || !sessionId.length)
|
||||
if (!homeserverURL.length || !clientSecret.length || !sid.length || !sessionId.length)
|
||||
{
|
||||
NSLog(@"[AuthInputsView] setExternalRegistrationParameters failed: wrong parameters");
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
// Prepare the registration parameters (Ready to use)
|
||||
NSURL *identServerURL = [NSURL URLWithString:identityURL];
|
||||
|
||||
NSMutableDictionary *threepidCreds = [NSMutableDictionary dictionaryWithDictionary:@{
|
||||
@"client_secret": clientSecret,
|
||||
|
||||
@"sid": sid
|
||||
}];
|
||||
if (identityURL)
|
||||
{
|
||||
NSURL *identServerURL = [NSURL URLWithString:identityURL];
|
||||
threepidCreds[@"id_server"] = identServerURL.host;
|
||||
}
|
||||
|
||||
externalRegistrationParameters = @{
|
||||
@"auth": @{@"session": sessionId, @"threepid_creds": @{@"client_secret": clientSecret, @"id_server": identServerURL.host, @"sid": sid}, @"type": kMXLoginFlowTypeEmailIdentity},
|
||||
@"auth": @{
|
||||
@"session": sessionId,
|
||||
@"threepid_creds": threepidCreds,
|
||||
@"type": kMXLoginFlowTypeEmailIdentity
|
||||
},
|
||||
};
|
||||
|
||||
// Hide all inputs by default
|
||||
|
||||
Reference in New Issue
Block a user