You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
I connect with keycloak protocols with a post method get token and refresh token but how to assign these values to be able to use both callbacks and other functions in keycloak ???? PLEASE GIVE ME A TRICK
Normally, assign operator is not working because when i re-rendering page, tokens are forget
❌❌ keycloak.token = response.data.access_token ❌❌
varaxios=require('axios');varqs=require('qs');vardata=qs.stringify({'client_id': <keycloak-client>,
'grant_type': 'password',
'username': <username>,
'password': <password>});varconfig={method: 'post',url: `${<keycloak-auth-server>}/realms/${<keycloak-realm>}/protocol/openid-connect/token`,
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
data : data
};axios(config).then(function(response){//TODO: THIS AREA FOR RESPONSE HOW TO SET TOKEN AND REFRESH TOKEN TO KEYCLOAK NORMALLY ASSIGNED ONLY WORKED RE-RENDERED HOW TO USE ALL KEYCLOAK-JS FUNCTIONALITIESconsole.log(JSON.stringify(response.data));})
.catch(function (error) {console.log(error);});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I connect with keycloak protocols with a post method get token and refresh token but how to assign these values to be able to use both callbacks and other functions in keycloak ???? PLEASE GIVE ME A TRICK
Beta Was this translation helpful? Give feedback.
All reactions