I'm using the okta-auth-js with SPA and I want to retrieve the refresh token.
My config is the following:
okta: {
issuer: 'https://myIssuer/oauth2/default',
clientId: '0oahHMKdu3BlV0x1hdoa7lV0',
redirectUri: 'http://localhost:3000/login/callback',
responseType: 'code'
}
And I perform the authentication like this:
oktaAuth.signInWithCredentials({
username,
password
}).then((transaction) => {
switch (transaction.status) {
case 'SUCCESS': {
const { sessionToken } = transaction;
oktaAuth.token.getWithRedirect({ sessionToken });
break;
};
... // Other status cases
I have enable refresh token rotation in the Okta dashboard but I get only access_token and id_token as response.
My question is how to get the refresh_token also?