Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- (void)enableManualAuthentication example #10

Closed
chbeer opened this issue Jun 18, 2012 · 2 comments
Closed

- (void)enableManualAuthentication example #10

chbeer opened this issue Jun 18, 2012 · 2 comments
Labels
Milestone

Comments

@chbeer
Copy link

chbeer commented Jun 18, 2012

The method - (void)enableManualAuthentication sounds very useful. But it misses documentation and can't be used because of that.

@ghost
Copy link

ghost commented Aug 19, 2012

Here is what I do to get manual authentication to work (iosupdate branch).

When initializing the simperium instance set the following properties:

self.simperium.authenticationOptional = YES;
This make a cancel button appear.

self.simperium.authenticationEnabled = NO;
This prevents the authentication dialog from popping up.

self.simperium.loginViewControllerClass = [LoginViewController class];
This drops in a custom subclass of SPLoginViewController to overwrite the cancel: message, otherwise you would not get feedback that the user canceled the dialog.

When the user hits a sign "Sign in" button, I set
self.simperium.authenticationEnabled = YES;
which causes the login controller to show up.

That's it basically. There is however another caveat. After SPAuthenticationManager did authenticate with the service and the login screen wasn't shown (because credentials where still stored in keychain, I presume), it dismisses whatever modal viewcontroller has been presented on screen. I already sent in a bug report and hope that'll be fixed soon.

@mikejohnstn
Copy link
Contributor

Closing this in favor of #161

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants