I am requesting a response type of 'id_token token' from IdentityServerv3 and getting the expected id_token and access_token.
I am successfully storing the id_token in localStorage but the access_token is not.
I found the section in the authentication.js file that addresses the accessToken
but was unable to find anywhere that it actually stores the token.
Authentication.prototype.setToken = function setToken(response, redirect) {
var accessToken = response && response[this.config.responseTokenProp];
var tokenToStore = void 0;
if (accessToken) {
if ((0, _authUtilities.isObject)(accessToken) && (0, _authUtilities.isObject)(accessToken.data)) {
response = accessToken;
} else if ((0, _authUtilities.isString)(accessToken)) {
tokenToStore = accessToken;
}
}
The idToken has a section that does this
if (idToken) {
this.storage.set(this.idTokenName, idToken);
}
How do I store the accesstoken in localStorage?
How can I pass the accesstoken instead of the idToken to my WebApi?
Are both the storage question and accessToken configurable via authconfig file?
I am requesting a response type of 'id_token token' from IdentityServerv3 and getting the expected id_token and access_token. I am successfully storing the id_token in localStorage but the access_token is not. I found the section in the authentication.js file that addresses the accessToken but was unable to find anywhere that it actually stores the token.
Authentication.prototype.setToken = function setToken(response, redirect) { var accessToken = response && response[this.config.responseTokenProp]; var tokenToStore = void 0;
The idToken has a section that does this if (idToken) { this.storage.set(this.idTokenName, idToken); }
How do I store the accesstoken in localStorage? How can I pass the accesstoken instead of the idToken to my WebApi? Are both the storage question and accessToken configurable via authconfig file?
Thanks, DM