using widget.showSignInAndRedirect().catch(handleError); it always brings me to /implicit/callback and then to the base Uri. Why isn’t it redirecting me to the deep link (protected route) I initially tried to go to while I was unauthenticated?
Steps:
Go to protected route
Get redirected to login page
Login
Get redirected to /implicit/callback
Get redirected to base url (window origin) instead of the protected route I originally attempted
In my case, the basename is /customers. It seems to be trying to bring me to /customers/customers/policies instead of /customers/policies.
Looks like I’m hitting this same issue: https://github.com/okta/okta-react/issues/60 - but there hasn’t been any activity on that issue in a month.
I added this to my okta config which seems to be a workaround:
restoreOriginalUri: (_: any, originalUri: string) => {
window.location.replace(originalUri);
}
Chrome Version 87.0.4280.88 (Official Build) (x86_64)
okta-auth-js 4.5.1
okta-react 4.0.0
okta-signin-widget 5.2.1
@jchabot86 We had a JIRA OKTA-353934 created for the GH issue https://github.com/okta/okta-react/issues/60. There will be update or improvement soon.