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 login_hint support to Enterprise Connections #413

Merged
merged 4 commits into from
Apr 4, 2017

Conversation

cocojoe
Copy link
Member

@cocojoe cocojoe commented Mar 15, 2017

No description provided.

@cocojoe cocojoe force-pushed the feature_login_hint branch from 34ddd2a to 902cf8f Compare March 15, 2017 11:07
@cocojoe cocojoe changed the title Added login_hint support to EnterpriseDomainInteractor Added login_hint support to Enterprise Connections Mar 15, 2017
@cocojoe cocojoe requested a review from hzalaz March 15, 2017 12:14
@@ -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) {
Copy link
Member

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

Copy link
Member Author

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.

func login(_ connection: String, parameters: [String: String], callback: @escaping (OAuth2AuthenticatableError?) -> Void)
}

extension OAuth2Authenticatable {
Copy link
Member

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

func login(_ connection: String, loginHint: String?, callback: @escaping (OAuth2AuthenticatableError?) -> Void)
}

extension OAuth2Authenticatable {
Copy link
Member

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

Copy link
Member Author

@cocojoe cocojoe Mar 20, 2017

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

@cocojoe cocojoe force-pushed the feature_login_hint branch from 673a2d2 to 26494e3 Compare March 20, 2017 10:16
@hzalaz hzalaz added this to the v2-Next milestone Mar 24, 2017
cocojoe added 4 commits March 27, 2017 18:19
Added "login_hint" support to EnterpriseDomainInteractor
Added Default Extension to OAuth2Authenticatable
Added Tests
Update Mocks
Ensure loginHint param always specified
Update Testing
Update auth0_shipper plugin
@cocojoe cocojoe force-pushed the feature_login_hint branch from f21b9cf to e8b81d2 Compare March 27, 2017 17:29
@cocojoe cocojoe merged commit eecd156 into master Apr 4, 2017
@hzalaz hzalaz modified the milestones: v2-Next, 2.2.0 Apr 25, 2017
@hzalaz hzalaz deleted the feature_login_hint branch May 8, 2017 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants