renesahmkow
renesahmkow

Reputation: 1

Keyclock is not returning the refresh_token

How do i get the refresh token ? I only get this response:

{
  "state": "XXX",
  "session_state": "XXX",
  "id_token": "XXX",
  "access_token": "XXX",
  "token_type": "Bearer",
  "expires_in": "86400"
}

https://URL/auth/realms/XXX/protocol/openid-connect/auth?client_id=XXX&redirect_uri=XXX&nonce=fe6c4327-ad30-4fd0-bd50-2e42d1537cd3&state=fe6c4327-ad30-4fd0-bd50-2e42d1537cd3&response_type=id_token+token&response_mode=fragment&scope=openid&login_hint=XXX

Does someone know what we have to do ? I am getting the URL from the backend. How do i get the refresh token out of it? Thanks in advance

Upvotes: 0

Views: 38

Answers (1)

Tore Nestenius
Tore Nestenius

Reputation: 19921

you are only asking for the openid scope, you need to also ask for the offline_access scope, to get the refresh token.

Upvotes: 0

Related Questions