public_profile
and email
. This way, the user email
will also be included as part of the response, provided the access request is accepted by the user.performLogin
and the interface SimpleCallback
. Go
ahead and add both.onSuccess
method./oauth/access_token
endpoint. Use the following
query parameters:grant_type
: fb_attenuate_token
.fb_exchange_token
: the access token received upon login.client_id
: your App ID. This value comes from the Facebook Developer’s dashboard and should
already be in use in your application if you have integrated Facebook Login successfully.GraphRequest
class to perform this request./904636746222815
). Use the following parameters:access_token
: the access token received upon login.fields
: the fields from the user profile that you’d like to get back in the response. These are
directly tied to the Facebook Login Button permissions that were configured at the beginning. When a
permission is optional, the user must first consent to give access to it. For the purpose of signing up a user
at Auth0, their full name and email will suffice.onCreate
method. Note how the credentials defined in the step above are passed to the
Auth0
constructor and then a new instance of the AuthenticationAPIClient
is created with
it.exchangeTokens
.The API client declares the method loginWithNativeSocialToken
that receives a token and a subject
type. The former corresponds to the session token, and the latter indicates what type of connection the backend
will attempt to authenticate with.For native Facebook Login, you will use the following value:
"http://auth0.com/oauth/token-type/facebook-info-session-access-token"
Other values that need to be configured are the user profile (using the user_profile
key) and the
scope you request the Auth0 tokens contain.performLogin
method.If everything went well, you should now be able to authenticate natively with the Facebook Login SDK. This means
that if the Facebook app is installed on the device, the authentication will be handled via the application and
not a browser app.