-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client specified not to prompt and blank page after session expire #77
Comments
@polklabs Do you mind providing a code snippet that causes this behavior? |
@jaredperreault-okta Can't really provide too much code at the moment. But here are some potentially relevant snippets. Maybe I missed something upgrading from version 3.x to 4.x? Almost all site routes are protected, only routes that aren't protected are /logout and /implicit/callback
App.module.ts
|
Thanks for reporting this, we'll look into it Internal Ref: OKTA-447151 |
Hi. Piggie backing off of this, I have experienced the same in multiple Production applications as well. Here is my ticket on the Okta board for reference: https://devforum.okta.com/t/users-are-not-redirected-to-log-in-widget-when-returning-to-page-after-a-token-timeout/17830 @jaredperreault-okta I have also opened a support ticket in Okta Support (#01235377) if it helps! |
@icatchx22i What version of |
We're using Angular 12 and yes still experiencing after upgrading to the latest okta-angular and okta-auth-js: Our base route looks like this: We also tried placing the Guards inside the MyFormsModule routing instead. But that did not improve the situation. Can this be some kind of Lazyloading / Redirect deadlock? I noticed both examples here use lazy loading. |
FYI: I also tested the routes with canLoad instead of canActivate but that did not help |
@jaredperreault-okta Any updates on this? |
@polklabs The issue might related to the mis-use of different route callbacks, here is a guideline for it:
You can also find code example from one of our test apps. |
@shuowu That's not the issue. This only happens after the session and okta sessions have expired. Odd behavior is that opening the dev tools window will trigger the page to redirect to login, otherwise it just sits on a blank white page indefinitely waiting for authentication |
@tlahav @polklabs I have identified an issue within the token auto renew process, it currently can cause unhandled promises in memory, and if error is thrown from there, it can break the following authState update. Here is a PR (okta/okta-auth-js#1033) to fix the issue (in okta-auth-js), can you verify the change to see if it helps with the issue you have? |
Hey, I tested the PR locally and noticed that it worked. Although, I was not ever able to duplicate the issue on demand so I do cant tell for certain that this fixed the problem. |
I wanted to echo this as we've experienced that as well. In fact, I believe it's not the opening of the DevTools but actually the resizing of the View window that triggers the forward to the okta log in page. |
Having some trouble getting the code to test the PR locally. But I believe I've been seeing the exact same issue as tlahav. |
This is resolved for me in |
I'm submitting a:
Current behavior
When opening app which requires okta authentication the user is not redirected to sign in. They just see a blank page with nothing.
In the console is the error:
The client specified not to prompt, but the user is not logged in
To trigger redirect you have to refresh the page (opening dev tools also triggers redirect)
Expected behavior
Okta automatically redirects user to sign in page and then returns user to app after login
Minimal reproduction of the problem with instructions
Steps to reproduce:
blank page, no redirect with error message in console.
The client specified not to prompt, but the user is not logged in
Extra information about the use case/user story you are trying to implement
It was working perfectly in the old version
"@okta/okta-angular": "^3.1.0",
"@okta/okta-auth-js": "^4.9.1",
but has stopped working since updating
Environment
node -v
): 16.13.0Configuration
The text was updated successfully, but these errors were encountered: