# After being redirected from AUTH0\_DOMAIN/authorize to callback I get token but only in CALLBACK\_URL#access\_token=TOKEN form

**URL:** <https://community.auth0.com/t/after-being-redirected-from-auth0-domain-authorize-to-callback-i-get-token-but-only-in-callback-url-access-token-token-form/8739>\
**Category:** Get Help\
**Tags:** request, token, parameter, callback\
**Created:** [November 14, 2017, 5:08pm UTC](https://community.auth0.com/t/after-being-redirected-from-auth0-domain-authorize-to-callback-i-get-token-but-only-in-callback-url-access-token-token-form/8739 "2017-11-14T17:08:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![malekpatryk\_auth0](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@malekpatryk\_auth0](https://community.auth0.com/u/malekpatryk_auth0)\
**Post date:** [November 14, 2017, 5:08pm UTC](https://community.auth0.com/t/after-being-redirected-from-auth0-domain-authorize-to-callback-i-get-token-but-only-in-callback-url-access-token-token-form/8739/1 "2017-11-14T17:08:39Z")

</div>

I am trying out social login with Auth0 (here with Github) and after going to https://AUTH\_DOMAIN/authorize?client\_id=CLIENT\_ID&response\_type=token&redirect\_uri=[http://localhost:3001/api/private](http://localhost:3001/api/private) I get redirected through Github login and then I get redirected at: [http://localhost:3001/api/private#access\_token=TOKEN&expires\_in=7200&token\_type=Bearer](http://localhost:3001/api/private#access_token=TOKEN&expires_in=7200&token_type=Bearer) Is that correct? This is not a request param which I can read on server side. Am I doing something wrong?

---

<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:** [November 14, 2017, 7:55pm UTC](https://community.auth0.com/t/after-being-redirected-from-auth0-domain-authorize-to-callback-i-get-token-but-only-in-callback-url-access-token-token-form/8739/2 "2017-11-14T19:55:10Z")

</div>

You’re using `response_type=token` in the authorization endpoint request which signals you’re performing an [implicit grant](https://auth0.com/docs/api-auth/grant/implicit) where the issued response will be delivered to the client-side components of your web application (by default this is achieved by including the response in the fragment component of the redirect URL).

The above is useful for browser-based application (SPA’s) where the application logic is on the client-side and as such the tokens need to be available there.

If you have a more traditional web application where the issued tokens will be used from the server-side and not from the client-side then you should be using an authorization code grant by configuring `response_type=code`. This, by default, will trigger the response to be included in the **query component** of the redirect URL and as such available to the server-side. Have in mind that in this mode you’ll need to perform an additional request to actually obtain the tokens. See the following documentation for more information: [Authorization Code Flow](https://auth0.com/docs/api-auth/grant/authorization-code)

---

<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:57am UTC](https://community.auth0.com/t/after-being-redirected-from-auth0-domain-authorize-to-callback-i-get-token-but-only-in-callback-url-access-token-token-form/8739/3 "2018-03-02T05:57:24Z")

</div>


