-
Notifications
You must be signed in to change notification settings - Fork 16
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
Redirect users to login page on NONCE mismatch #142
Comments
Could we make maxAge configurable? Or would it be a security risk? v1 had this cookie set to |
@KarolisL yeah, I agree, 60 seconds is a little bit to aggressive. I set it like that because the token exchange code Auth0 send is valid for about 60 seconds probably and to tighten security. But as you point out its possible that the user let the login page waiting for 10 min before actually clicking sign in. I'll add a configuration to specify maxAge in config, and set a more sensible default, maybe 5 or 10 minutes valid cookie time. |
@KarolisL like you say when the user get a nonce error on the screen, I have seen the errors mostly when using back button and/or reload page. I'll try to investigate about setting a default login page in Auth0. I think maybe they have something like that. |
@dniel in my case, configuring the maxAge would be enough, for now, I could make a PR for this feature. |
@KarolisL Thanx for the PR! Could you update your branch to exclude sonarcloud testing in PR-builds to make the PR build succeed? https://travis-ci.community/t/pull-request-builds-fail-with-sonar/3473 |
@KarolisL I have created a new project https://github.com/dniel/forwardauth-ui for implementing a react UI application. #63 will probably be solved there. |
@dniel I have updated the PR to disable sonar on PRs. |
@KarolisL thanx for the help, please close this issue when you have verified that the new build is working. |
I've just checked, the new build worked! |
Sometimes users get NONCE mismatch. I've seen some similar log messages:
My hypothesis is that user mistakenly either:
https://<real_website_domain>/oauth2/signin?code=hgfbmMwAu5iBV8ZL&state=<snip>
The error page on
<real_website_domain>/oauth2/signin
(400 BAD REQUEST
) confuses users and refresh doesn't mitigate the error since NONCE is still invalid.Would it make sense to redirect users back to auth0 just like they were coming to the page for the first time (in order to set proper NONCE)?
The text was updated successfully, but these errors were encountered: