[keycloak-dev] How to use an offline token to get access token

mhashim.gm at gmail.com mhashim.gm at gmail.com
Sat Feb 13 01:18:05 EST 2016


Hello,
I have a javascript application with keycloak javascript adapter, I use
direct grant to get the initial offline token and save to database and
it works great, the problem is when I want to get an access token the
adapter fails silently. Here is how I initiate the adapter

    keycloak.init({
            refreshToken: response.refresh_token,
            checkLoginIframe: false
          })
          .success(authenticated => {
            if(!authenticated)
              dispatch(loginFailure())
            else {
        ....
      }

then I tried to get the token directly from google chrome "postman"
tool:

POST
http://localhost:8080/realms/sisdn-realm/protocol/openid-connect/token

headers:
Content-Type: application/x-www-form-urlencoded
body:
grant_type=refresh_token
refresh_token=eyJhbGciOi...
client_id=sisdn

but the server responds with not-found, what am I doing wrong?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-dev/attachments/20160213/a68dd31d/attachment.html 


More information about the keycloak-dev mailing list