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

Added onUserSignupBlock to A0LockViewController #161

Closed
wants to merge 1 commit into from

Conversation

liamnichols
Copy link

Hey,

Due to limitations with the Sign Up UI in the A0LockViewController, we had been unable to use it because we need to capture additional fields however the client still wanted a way to access the Sign-Up interface from within the A0LockViewController (so that the users don't miss things like social sign in).

I come up with a solution to add a onUserSignupBlock block (similar to onUserDismissBlock) allowing developers to provide an override point upon the user selecting the Sign Up button.

If nil (default), the SDK will work like it did previously and present the interface provided by the app however if the developer sets this block, upon the user selecting the Sign Up button, the block will be executed instead.

This means that we can do something like the following:

A0LockViewController *controller = [[A0LockViewController alloc] initWithLock:lock];
controller.closable = YES;
...
controller.onUserDismissBlock = dismissBlock;
controller.onUserSignupBlock = ^{
    [self presentSignupScreen];
};

Would be great to get it merged back into the main branch so that we can still receive other updates without having to manually merge into our own fork.

Thanks

@hzalaz
Copy link
Member

hzalaz commented Aug 20, 2015

@liamnichols thanks for the PR. We have a couple of request about custom fields for Sign Up but didn't found a good way to include that in Lock UI.

I am not to keen of start adding multiple blocks to customise the navigation of Lock, we usually recommend to build a custom UI in these cases.
This is our guide that shows you how to build a custom UI, and even has a sample written in Swift and is not that hard if you only have DB and Social connections since it's just calling the correct authentication, the most complicated part we have in Lock is how to handle enterprise connections like ActiveDirectory and such.

Let me think about this PR to see if we can improve it a little bit 😄

@hzalaz hzalaz force-pushed the master branch 2 times, most recently from 9f6daea to ca47e1a Compare September 18, 2015 19:04
@hzalaz
Copy link
Member

hzalaz commented Oct 22, 2015

@liamnichols I am closing this in favor of #183. It's already merged and released in CocoaPods. It has almost the same API but instead of handling yourself the presentation, Lock will handle it and provide a way to navigate back to it. (The PR has a little more info till we write the docs)

@hzalaz hzalaz closed this Oct 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants