Skip to content

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

Docs-fix: Missing closing parenthesis in auth-google.mdx (#27764)

dikshant rajput0164efe2b863
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 4cea739098d..2c2644b17df 100644
--- a/apps/docs/content/guides/auth/social-login/auth-google.mdx
+++ b/apps/docs/content/guides/auth/social-login/auth-google.mdx
@@ -329,17 +329,13 @@ Most web apps and websites can utilize Google's [personalized sign-in buttons](h
```js
// Adapted from https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#converting_a_digest_to_a_hex_string
- const nonce = btoa(
- String.fromCharCode(...crypto.getRandomValues(new Uint8Array(32))),
- );
- const encoder = new TextEncoder();
- const encodedNonce = encoder.encode(nonce);
- crypto.subtle.digest("SHA-256", encodedNonce).then((hashBuffer) => {
- const hashArray = Array.from(new Uint8Array(hashBuffer));
- const hashedNonce = hashArray
- .map((b) => b.toString(16).padStart(2, "0"))
- .join("");
- }
+ const nonce = btoa(String.fromCharCode(...crypto.getRandomValues(new Uint8Array(32))))
+ const encoder = new TextEncoder()
+ const encodedNonce = encoder.encode(nonce)
+ crypto.subtle.digest('SHA-256', encodedNonce).then((hashBuffer) => {
+ const hashArray = Array.from(new Uint8Array(hashBuffer))
+ const hashedNonce = hashArray.map((b) => b.toString(16).padStart(2, '0')).join('')
+ })
// Use 'hashedNonce' when making the authentication request to Google
// Use 'nonce' when invoking the supabase.auth.signInWithIdToken() method