# /oauth/access\_token custom claims

**URL:** <https://community.auth0.com/t/oauth-access-token-custom-claims/7450>\
**Category:** Get Help\
**Tags:** custom-claims, facebook, claim, oidc, social-connections\
**Created:** [July 10, 2017, 11:48pm UTC](https://community.auth0.com/t/oauth-access-token-custom-claims/7450 "2017-07-10T23:48:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![valerio.mazzeo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/valerio.mazzeo/32/7792_2.png) [@valerio.mazzeo](https://community.auth0.com/u/valerio.mazzeo)\
**Post date:** [July 10, 2017, 11:48pm UTC](https://community.auth0.com/t/oauth-access-token-custom-claims/7450/1 "2017-07-10T23:48:43Z")

</div>

My current flow is the following:

- User open a native app, using the Facebook sdk retrieves a Facebook access\_token, then I exchange that for an auth0 access token.

My understanding is that /oauth/access\_token has been deprecated, but I cannot figure out how to replace it with one of the /oauth/token flows.

It seems to me that a OIDC compliant alternative is not ready, yet.

In the meantime I will be happy to continue using /oauth/access\_token but I have two problems with it:

- access\_token is not a JWT when using /oauth/access\_token
- I can’t manage to add any custom claim to the id\_token

Having to hit the /userinfo endpoint to retrieve the user information for each request, is not really an option as it would defeat the whole point of using JWT in the first place.

Is it possible that as today, there is no solution?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [July 11, 2017, 3:21pm UTC](https://community.auth0.com/t/oauth-access-token-custom-claims/7450/2 "2017-07-11T15:21:29Z")

</div>

The current situation is the one you described `/oauth/access_token` is only available as a legacy endpoint and as such it does not have any support for API Authorization (what would allow you to get a JWT access token) and also has no notion of strict OIDC compliance so that may explain the inability to add custom namespaced claims to ID token.

At this time, using API Authorization with social authentication implies the use of browser-based authentication.

---

<div class="post-metadata">

**Author:** ![valerio.mazzeo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/valerio.mazzeo/32/7792_2.png) [@valerio.mazzeo](https://community.auth0.com/u/valerio.mazzeo)\
**Post date:** [July 11, 2017, 3:24pm UTC](https://community.auth0.com/t/oauth-access-token-custom-claims/7450/3 "2017-07-11T15:24:08Z")

</div>

> At this time, using API Authorization with social authentication implies the use of browser-based authentication.

Could you please elaborate?

What would the flow be like, in my app when an user press the login with Facebook button?

Open safari at this address: [Facebook](https://www.facebook.com/v2.9/dialog/oauth?client_id=myAppID&redirect_uri=https://myCompany-dev.auth0.com/login/callback)

Then what? I am not using the auth0 sdk

---

<div class="post-metadata">

**Author:** ![valerio.mazzeo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/valerio.mazzeo/32/7792_2.png) [@valerio.mazzeo](https://community.auth0.com/u/valerio.mazzeo)\
**Post date:** [July 11, 2017, 3:24pm UTC](https://community.auth0.com/t/oauth-access-token-custom-claims/7450/4 "2017-07-11T15:24:08Z")

</div>

> At this time, using API Authorization with social authentication implies the use of browser-based authentication.

Could you please elaborate?

What would the flow be like, in my app when an user press the login with Facebook button?

Open safari at this address: [Facebook](https://www.facebook.com/v2.9/dialog/oauth?client_id=myAppID&redirect_uri=https://myCompany-dev.auth0.com/login/callback)

Then what? I am not using the auth0 sdk

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [July 11, 2017, 10:21pm UTC](https://community.auth0.com/t/oauth-access-token-custom-claims/7450/5 "2017-07-11T22:21:58Z")

</div>

You would need to open the browser at the Auth0 `authorize` [endpoint](https://auth0.com/docs/api/authentication#social) stating that you want to initiate authentication through Facebook. This would redirect to Facebook, the user would authenticate, Facebook would redirect to Auth0 and Auth0 would redirect to your application specified redirect URL. You would have to setup the native application as an handler for that final redirect URL, retrieve the necessary information from the URL and complete the authentication in your app (which would get you the tokens).

---

<div class="post-metadata">

**Author:** ![valerio.mazzeo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/valerio.mazzeo/32/7792_2.png) [@valerio.mazzeo](https://community.auth0.com/u/valerio.mazzeo)\
**Post date:** [July 11, 2017, 10:22pm UTC](https://community.auth0.com/t/oauth-access-token-custom-claims/7450/6 "2017-07-11T22:22:55Z")

</div>

thanks, I have already figured it out

---

<div class="post-metadata">

**Author:** ![valerio.mazzeo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/valerio.mazzeo/32/7792_2.png) [@valerio.mazzeo](https://community.auth0.com/u/valerio.mazzeo)\
**Post date:** [July 11, 2017, 10:22pm UTC](https://community.auth0.com/t/oauth-access-token-custom-claims/7450/7 "2017-07-11T22:22:55Z")

</div>

thanks, I have already figured it out

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/oauth-access-token-custom-claims/7450/8 "2018-03-02T05:55:16Z")

</div>


