I am having two issues using the latest widget(v. 7.4)(code below), for one I am not getting the access token, it just shows as undefined in the console. I am also not getting address information being returned even though I can see that its mapped properly and values are populated in okta, any help would be appreciated.
const oktaSignIn = new OktaSignIn({
baseUrl: baseUrl,
redirectUri: redirectUrl,
clientId: clientID,
useClassicEngine: true,
authParams: {
issuer: baseUrl ,//+“oauth2/default”,
scopes: [‘openid’, ‘email’,‘profile’, ‘phone’, ‘address’],
responseType: [‘code’,‘id_token’, ‘token’],
}
});
oktaSignIn.authClient.token.getUserInfo().then(function(user) {
oktaSignIn.authClient.tokenManager.getTokens()
.then(({ accessToken, idToken }) => {
// handle accessToken and idToken
console.log("access token/address: "+accessToken.value+":"+user.street_address);
$("#signature").show();
});
}, function(error) {
oktaSignIn.showSignInToGetTokens({
el: '#okta-login-container'
}).then(function(tokens) {
oktaSignIn.authClient.tokenManager.setTokens(tokens);
oktaSignIn.remove();
$("#signature").show();
const idToken = tokens.idToken;
const accessToken = tokens.accessToken;
console.error("values: "+idToken.claims.street_address+":"+idToken.claims.email+":"+accessToken.accessToken);
}).catch(function(err) {
console.error("THere is an error: "+err);
});
});