-
Notifications
You must be signed in to change notification settings - Fork 145
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 support for Social Native Token Exchange endpoint #281
Conversation
auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java
Show resolved
Hide resolved
auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java
Show resolved
Hide resolved
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.
Looks good, just left one minor thing.
auth0/src/test/java/com/auth0/android/authentication/AuthenticationAPIClientTest.java
Outdated
Show resolved
Hide resolved
* @return a request to configure and start that will yield {@link Credentials} | ||
*/ | ||
@SuppressWarnings("WeakerAccess") | ||
public AuthenticationRequest loginWithNativeSocialToken(@NonNull String token, @NonNull String tokenType) { |
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.
@lbalmaceda Where can I find the list of the supported tokenTypes
. Is there one for Google SignIn?
From the doc (https://auth0.com/docs/api/authentication#token-exchange-for-native-social) it looks like only apple-authz-code
is supported:
Identifier that indicates the type of subject_token.
Currently supported native social values are:
http://auth0.com/oauth/token-type/apple-authz-code.
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.
Google Sign-In is not supported yet, unfortunately. There's an ongoing effort to add Facebook Sign-In. The server-side team is working on this case by case per request from our customers.
That link you posted will be updated when support for another provider is added. And of course, once it's available, we will update the SDKs.
Changes
This is a small addition to the pool of supported endpoints. It's meant to exchange an external provider's token for auth0 tokens. AKA sign in into Auth0 with an external native provider.
References
See https://auth0.com/docs/api/authentication#token-exchange-for-native-social
Testing
I did not test this manually. Will be doing so soon.
This change adds unit test coverage
This change adds integration test coverage
This change has been tested on the latest version of the platform/language or why not
Checklist
I have read the Auth0 general contribution guidelines
I have read the Auth0 Code of Conduct
All existing and new tests complete without errors