Hassan Sayed
Hassan Sayed

Reputation: 1

Why am I not getting a refresh_token when I contact the token server?

I'm contacting the auth api and I'm getting an authorization code. But once I send it to the token server, I only get an access token and no refresh token with it. I'm including "access_type=offline" in my request to the authorization server, so I'm not understanding the problem here.

  `const scopes: ['openid', 'email', 'profile'] 
      const result= await AppAuth.startAsync({
        authUrl: `${discovery.authorizationEndpoint}`
        + `?scope=${encodeURIComponent(config.scopes.join(' '))}`
        + `&access_type=offline`
        + `&response_type=code`
        + `&redirect_uri=REDIRECT_URI` //Changed for StackOverFlow
        + `&client_id=CLIENT_ID` //Changed for StackOverFlow
      });`

That's what I'm doing to get the authorization code. Is anything visibly wrong?

Upvotes: 0

Views: 13

Answers (0)

Related Questions