# Refresh token returned from Postman, but not Angular2 call

**URL:** <https://community.auth0.com/t/refresh-token-returned-from-postman-but-not-angular2-call/58278>\
**Category:** Get Help\
**Tags:** refresh\_token\
**Created:** [February 22, 2021, 3:00pm UTC](https://community.auth0.com/t/refresh-token-returned-from-postman-but-not-angular2-call/58278 "2021-02-22T15:00:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kruegeba](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kruegeba/32/13314_2.png) [@kruegeba](https://community.auth0.com/u/kruegeba)\
**Post date:** [February 22, 2021, 3:00pm UTC](https://community.auth0.com/t/refresh-token-returned-from-postman-but-not-angular2-call/58278/1 "2021-02-22T15:00:19Z")

</div>

I have an Angular2 SPA which directs a user through an authorization code process for a 3rd party application. After the user logs in and authorizes the 3rd party application, I use the returned code and try to create an access\_token and refresh\_token. My authorize call:

https://my\_tenet/authorize?audience=my\_audience&scope=read:reap create:reap offline\_access&response\_type=code&client\_id=my\_client\_id&redirect\_uri=[http://localhost:4200/dashboard&state=asdf&prompt=login](http://localhost:4200/dashboard&state=asdf&prompt=login)

My oauth/token SPA call:

```
export class AuthenticationService {
constructor(private http: HttpClient) { }

createToken(code: string) : Promise<HttpResponse<any>> {
    debugger
    const payload = new HttpParams()
        .set('grant_type', 'authorization_code')
        .set('client_id', 'my_client_id)
        .set('client_secret', 'my_client_secret')
        .set('code', code)
        .set('redirect_uri', 'http://localhost:4200/dashboard')

    return this.http.post<any>(https://my_tenet/oauth/token', payload, { observe: 'response' })
        .toPromise();
}

```

}

The above response returns everything except the refresh\_token:

![image](https://global.discourse-cdn.com/auth0/original/3X/b/c/bcc4a61cbf2080f00dd2c982f31235de455899a3.png)

Now when I make the same create token call via Postman, it does return the refresh\_token:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/2/1/21350363e7d861d3ba83430099a70d36aa98f44a.png)

Am I missing something obvious as to why the refresh token is being left off the SPA app call? I am kicking off the /authorize process the same for both workflows (SPA vs Postman) in order to get the authorization code.

---

<div class="post-metadata">

**Author:** ![cibrax](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cibrax/32/27644_2.png) [@cibrax](https://community.auth0.com/u/cibrax)\
**Post date:** [February 22, 2021, 3:06pm UTC](https://community.auth0.com/t/refresh-token-returned-from-postman-but-not-angular2-call/58278/2 "2021-02-22T15:06:00Z")

</div>

You don’t get refresh tokens from applications running in a browser as there isn’t any secure and persistent store for them. You can still use Refresh Token Rotation as it is discussed here. [Refresh Token Rotation](https://auth0.com/docs/tokens/refresh-tokens/refresh-token-rotation)

---

<div class="post-metadata">

**Author:** ![kruegeba](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kruegeba/32/13314_2.png) [@kruegeba](https://community.auth0.com/u/kruegeba)\
**Post date:** [February 22, 2021, 3:08pm UTC](https://community.auth0.com/t/refresh-token-returned-from-postman-but-not-angular2-call/58278/3 "2021-02-22T15:08:48Z")

</div>

Ah okay this makes sense. Thank you for the info!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 23, 2021, 3:36pm UTC](https://community.auth0.com/t/refresh-token-returned-from-postman-but-not-angular2-call/58278/4 "2021-02-23T15:36:11Z")

</div>

Teamwork makes the dreamwork!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 25, 2021, 10:33am UTC](https://community.auth0.com/t/refresh-token-returned-from-postman-but-not-angular2-call/58278/5 "2021-02-25T10:33:25Z")

</div>


