keycloak javascript adapter request offline token -
i have js application use keycloak 1.7-final javascript adapter public client , standard flow , works fine wanted add offline capability application , don't know how offline token. according documentation client can request offline token adding parameter "scope=offline_access" when sending authorization request keycloak. thing don't know add parameter. tried add "keycloak.config" , "keycloak.init" not working.
in keycloak.config:
keycloak: { url: 'link omitted', realm: 'sisdn-realm', clientid: 'sisdn', redirect_uri: 'link omitted', flow: 'standard', 'enable-cors': true, scope: 'offline_access' }
and in keycloak.init
const keycloakconf = require('keycloak')//this same config above var keycloak = new keycloakconf(config.keycloak) keycloak.init({ onload: 'login-required', checkloginiframe: false, scope: 'offline_access' }) .success(authenticated => { if(!authenticated) dispatch(loginfailure()) else { global.keycloak = keycloak dispatch(loginsuccess()) } })
from js adapter code:
the init
method doesn't accept scope
option, login
method does.
Comments
Post a Comment