Skip to content
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

Quiz creation route not redirecting to user_auth on 401/403 #11773

Closed
1 task
nucleogenesis opened this issue Jan 23, 2024 · 5 comments · Fixed by #12414
Closed
1 task

Quiz creation route not redirecting to user_auth on 401/403 #11773

nucleogenesis opened this issue Jan 23, 2024 · 5 comments · Fixed by #12414
Assignees

Comments

@nucleogenesis
Copy link
Member

Overview

I've found when I step away from working on the quiz creation project that if my session has timed out then I just get a blank screen.

The expectation on a permissions error response is that we ship the user to the sign in page with a query param next which is set to the path that the user was trying to access.

Once the user signs in, they're redirected back to where they're trying to go in the first place.

Guidance, Replication

This seems to occur in multiple places in Coach -- I've confirmed it during Lesson creation & Quiz creation.

  • On develop branch
  • Sign in as an admin/coach, navigate to the Coach > Class > Plan > Quizzes > New Quiz
  • Go to your cookies in the devtools and delete the cookies, then quickly refresh the page (this emulates the session timeout situation consistently in my attempts)
  • The thing that really makes this a problem is that refreshing again and again results in the same blank page.

Look into this part of the Learn router for inspiration. We may consider adding something similar to the coach app's beforeEach router guard as well -- but note that we'll only really want to check if the user is logged in there.

This solution will not directly handle the 401 -- however, it will properly send the user to the AuthMessage, which they can then click to access the sign in page w/ the proper ?next parameter

Acceptance criteria

  • Signing out due to inactivity doesn't result in being stuck on a blank page during Quiz Creation (or any other part of Coach)
@GarvitSinghal47
Copy link
Contributor

@nucleogenesis @MisRob i would like to work on this issue , if it is open for contribution

@MisRob
Copy link
Member

MisRob commented Jan 26, 2024

Hi @GarvitSinghal47, we've just assigned you the other issue you asked for. If you're still interested in this one later on, please message us again. Thank you for all your work.

@GarvitSinghal47
Copy link
Contributor

Can I work on this issue now? @MisRob

@MisRob
Copy link
Member

MisRob commented Feb 12, 2024

Hi @GarvitSinghal47, thank you for volunteering, I will assign you

@nucleogenesis
Copy link
Member Author

I've moved this issue back into the Backlog as the associated PR has not had movement in several weeks. Hopefully whoever takes this on can follow-up on @GarvitSinghal47 's work in #11875 -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment