Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
On sandbox, when we log out the user. We redirect them to
contents#sandbox.
This controller is not properly setup to deal with one login, especially
when the one login feature is turned off.
Redirects from the page of this controller hit the Authentication. The
concern returns true that the candidate is signed but with db backed
session, not devise. So the user is stuck in a loop because devise
thinks the user is not signed in but our DB backed session concern says
it is.
Clearing the session fixes this issue.
In reality this should not happen because we don't attempt to use the db
session login when one login is off, in any of our other controllers.
But requests from this controller accesses the Authentication concern.
This commit tries to fix this by just clearing the session if one login
feature is not enabled, this will fix this issue. Ideally we would want
to not have this controller send requests to the Authentication concern
if one login is not enabled.
Changes proposed in this pull request
Authentication concern
Guidance to review
Only possible to test on sadbox. Or locally if you're really motivated
Screencast.2025-01-24.12.44.39.mp4
Things to check