iOS 11 introduces a new class SFAuthenticationSession
which supports Single Sign On (SSO) securely.
It's simple to use!
NSURL* url = [NSURL URLWithString:@"https://the_url_end_point_for_authentication_with_tokens_etc"];
[[SFAuthenticationSession alloc] initWithURL:url callbackURLScheme:nil completionHandler:^(NSURL *callbackURL, NSError *error) {
//Inspect callbackURL to get the access tokens, etc for the login session
}];
A major benefit of using SFAuthenticationSession
is that it runs in a separate process so the user can be confident that the app does not have a way to sniff the password. This is very useful for login protocols such as OAuth or SSO across multiple related applications.
Your feedback is valuable: Do you want more nuggets like this? Yes or No
.
.