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

feat(getSession): option to suppress server side getSession warning manually #953

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marcusklausen
Copy link

@marcusklausen marcusklausen commented Sep 15, 2024

What kind of change does this PR introduce?

options param introduced on getSession with a suppressWarning prop to suppress the following server warning:

Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.

What is the current behavior?

Currently the warning is displayed whenever getSession is accessed from the server, this causes excessive logs and hurts DX.

#873
#895

What is the new behavior?

Warnings are suppress if suppressWarning: true in options

Additional context

Add any other context or screenshots.

@marcusklausen marcusklausen changed the title feat (getSession): option to suppress server side getSession warning manually feat(getSession): option to suppress server side getSession warning manually Sep 15, 2024
@jeromevvb
Copy link

Can we please get this PR in? It isn't very pleasant these logs
Thank you 🙏

@imbhargav5
Copy link

Several of users complained about this warning. Please consider this PR

@TimurBas
Copy link

Please consider this.

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

Successfully merging this pull request may close these issues.

4 participants