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

Add optional forgot password link #408

Closed
wants to merge 4 commits into from
Closed

Add optional forgot password link #408

wants to merge 4 commits into from

Conversation

prvnl
Copy link
Contributor

@prvnl prvnl commented Nov 28, 2014

With this PR, you can add an optional Forgot Password button to the Login ViewController (Ref: #155). This button is only shown when is explicitly activated and an valid URL is supplied using a localized string. By using the localized string, you can set specific URL's per language. This forgot password button switches place with the TOS button, so it doesn't take extra space in the Login ViewController.

To activate the button use: [SPAuthenticationConfiguration sharedInstance].showForgotPasswordButton = YES;
The localized string that should be used for the Forgot Password URL is: "Forgot Password URL"

This PR also changes the TOS URL to a localized custom TOS URL using: "TOS URL". if it's not supplied and/or valid, it uses the default Simperium TOS.

Hope it helps!

Regards Patrick

@prvnl
Copy link
Contributor Author

prvnl commented Nov 29, 2014

Added an additional property to show/hide the TOS button (Ref: #162). The default value is set to YES, so it doesn't change the setup for current users of the framework.

@jleandroperez
Copy link
Contributor

@prvnl sorry it took so long to address this issue!.

Since this PR cannot be merged, i've created a new branch, and cherry picked all of your commits here.

I've introduced a couple modifications:

  • SPAuthenticationConfiguration now has forgotPasswordURL and termsOfServiceURL properties. Removing any of them both will cause the links not to show up.
  • SPForgotPWViewController and SPTOSViewController have been merged into SPWebViewController.

Usage would be:

[[SPAuthenticationConfiguration sharedInstance] setTermsOfServiceURL:NSLocalizedString(....)];

Thanks so much for helping us out!. Only pending is OSX, which will be addressed shortly.

jleandroperez added a commit that referenced this pull request Mar 20, 2015
@prvnl
Copy link
Contributor Author

prvnl commented Mar 22, 2015

@jleandroperez you're welcome! I'll give it a try the coming week, thanks for all the work!

@jleandroperez
Copy link
Contributor

@prvnl awesome! thank you sir!

@prvnl
Copy link
Contributor Author

prvnl commented Mar 23, 2015

@jleandroperez it works great, nice modifications! Thanks for making this generally available in the framework!

If someone is interested in a forgot password mechanism for Simperium, they could use the basis of https://github.com/prvnl/simperium-user-manager to support this feature.

@jleandroperez
Copy link
Contributor

@prvnl Thank you Patrick!!

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.

None yet

2 participants