res.session.setCookieAndRedirect "session is undefined"

Using latest Okta widget 4.2.3

function success(res) {
  if (res.status === 'SUCCESS') {
    res.session.setCookieAndRedirect('https://example.com/dashboard');
  }
}

Getting error in browser console
“res.session is undefined”
Is there any fix/documentation available for the mentioned issue.

Hello Gautham,

Where did you find the code for this example? We’re trying to improve our documentation, that’s why I ask.

If you want to get at the session, you’ll need to use the authClient that’s available on your signIn object. See https://github.com/okta/okta-signin-widget#authclient for more info.

Hi Mraible

Was able to sort it out by removing clientID from the configuration passed to OktaSignIn function.
https://developer.okta.com/live-widget/

It’s here https://developer.okta.com/code/javascript/okta_sign-in_widget/#sign-in-to-okta-with-the-default-dashboard

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