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

Do not swallow gSSP errors in withAuthRequired #72

Closed
wants to merge 1 commit into from

Conversation

jclem
Copy link

@jclem jclem commented Apr 15, 2022

This moves the catch block in withAuthRequired to immediately after our last "is there a user" check.

Now, errors in getServerSideProps will be thrown if they occur.

Fixes https://github.com/supabase-community/supabase-auth-helpers/issues/71

@jclem jclem marked this pull request as draft April 15, 2022 19:10
@jclem
Copy link
Author

jclem commented Apr 15, 2022

Note that this is currently a draft, as I hacked this fix together quickly and have yet to test it myself.

@thorwebdev
Copy link
Contributor

Thanks @jclem. I think this might be a duplicate of #48

Sorry that we haven't gotten this in yet, we're currently revamping our repo setup (#75) and will get this in right after 👍

@jclem
Copy link
Author

jclem commented Apr 20, 2022

@thorwebdev It's the same, so I'll close this in favor of @a-type's contribution. Sorry for the cruft, I just forgot to search 🤦

@jclem jclem closed this Apr 20, 2022
@thorwebdev thorwebdev mentioned this pull request May 10, 2022
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In withAuthRequired, errors thrown in getServerSideProps should not redirect
2 participants