Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: SwitchGoogle social auth to getClaims (#43593)

Chris Chinchilladebecf3921d4
diff --git a/apps/docs/content/guides/auth/social-login/auth-google.mdx b/apps/docs/content/guides/auth/social-login/auth-google.mdx
index dfd3aebff5c..805fb928713 100644
--- a/apps/docs/content/guides/auth/social-login/auth-google.mdx
+++ b/apps/docs/content/guides/auth/social-login/auth-google.mdx
@@ -395,11 +395,11 @@ const OneTapComponent = () => {
console.log('Nonce: ', nonce, hashedNonce)
// check if there's already an existing session before initializing the one-tap UI
- const { data, error } = await supabase.auth.getSession()
+ const { data: { claims }, error } = await supabase.auth.getClaims()
if (error) {
- console.error('Error getting session', error)
+ console.error('Error getting claims', error)
}
- if (data.session) {
+ if (claims) {
router.push('/')
return
}