Okta-signin-widget and token manager (sessionStorage)

Hi,

I am using okta-signin-widget in my angular app. I want to configure the inner OktaAuth to write the token into the session storage instead fo local storage.

I know OktaAuth has this config but I couldn’t find away to change in okta-signin-widget

var config = {
url: ‘https://{yourOktaDomain}’,
tokenManager: {
storage: ‘sessionStorage’
}
};

var authClient = new OktaAuth(config);

How can I change the tokenManager config from okta-signin-widget ?

Hi,

Did you find a solution to this issue? I couldn’t configure it either.
Appreciate if you can help.

Thanks,
Bpl.

Even i kind of getting same issue. looks like sessionstorage not working I am using @okta/okta-signin-widget": “^4.1.1”,

Did you find any solution for it?

have you tried this to provide the config for okta-auth-js? https://github.com/okta/okta-signin-widget#configuration

authParams: {
    // Configuration for authClient. See https://github.com/okta/okta-auth-js#configuration-options
  }

Has anyone been able to get the tokens saved to sessionStorage while using the Sign-in widget?
I have tried configuring it in the authClient and using that for the widget but that has not worked either.
Anyone got any suggestions?

as phi1ipp mentioned above, you need to pass in any additional configs for authClient within the authParams property of the widget config. E.g

authParams: {
  tokenManager: {
    storage: 'sessionStorage' 
  }
}

Thank you andrea - that worked.
You guys have it in the readme but I somehow missed that.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.