-
Notifications
You must be signed in to change notification settings - Fork 110
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 login_hint support to Enterprise Connections #413
Conversation
34ddd2a
to
902cf8f
Compare
Lock/Auth0OAuth2Interactor.swift
Outdated
@@ -30,19 +30,22 @@ struct Auth0OAuth2Interactor: OAuth2Authenticatable { | |||
let options: Options | |||
let nativeHandlers: [String: AuthProvider] | |||
|
|||
func login(_ connection: String, callback: @escaping (OAuth2AuthenticatableError?) -> Void) { | |||
func login(_ connection: String, parameters: [String: String] = [:], callback: @escaping (OAuth2AuthenticatableError?) -> Void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't see the need now to add a dictionary of parameters that are already passed with Options
. Now we only need to add an optional login_hint
parameter so lets add just that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Np, I was unsure if we should open it up for future use or just login_hint
for now.
Lock/OAuth2Authenticatable.swift
Outdated
func login(_ connection: String, parameters: [String: String], callback: @escaping (OAuth2AuthenticatableError?) -> Void) | ||
} | ||
|
||
extension OAuth2Authenticatable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to have this one here since internally we'll always pass parameters
Lock/OAuth2Authenticatable.swift
Outdated
func login(_ connection: String, loginHint: String?, callback: @escaping (OAuth2AuthenticatableError?) -> Void) | ||
} | ||
|
||
extension OAuth2Authenticatable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to have this extension since Lock will always use the parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it to default the OAuth2 button. However is less code just to pass nil
:) Done
673a2d2
to
26494e3
Compare
Added "login_hint" support to EnterpriseDomainInteractor Added Default Extension to OAuth2Authenticatable Added Tests Update Mocks
Updated Tests
Ensure loginHint param always specified Update Testing
Update auth0_shipper plugin
f21b9cf
to
e8b81d2
Compare
No description provided.