Closed james9909 closed 5 years ago
This pull request is automatically deployed with Now. To access deployments, click Details below or on the icon next to each push.
I solved this problem of returning to the pre-auth URL after auth in PrairieLearn with another cookie. It was much cleaner than query parameter parsing and was surprisingly easy to add (only 3-4 lines of code in the right place in the auth code).
Adds a
redirect
query parameter to the login route if an unauthenticated user lands on an authenticated route. Also fixes an issue I was having withsafeAsync
when writing tests for this new functionality.Closes #188.