Skip to content

Commit

Permalink
fix: typo in warning message (#975)
Browse files Browse the repository at this point in the history
## What kind of change does this PR introduce?

Fix a small typo in the warning message when using user object from the
server.
  • Loading branch information
DavDeDev authored Nov 1, 2024
1 parent cb052a9 commit 4f21f93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GoTrueClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ export default class GoTrueClient {
if (!suppressWarning && prop === 'user') {
// only show warning when the user object is being accessed from the server
console.warn(
'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.'
'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 may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.'
)
suppressWarning = true // keeps this proxy instance from logging additional warnings
this.suppressGetSessionWarning = true // keeps this client's future proxy instances from warning
Expand Down

0 comments on commit 4f21f93

Please sign in to comment.