The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Fix prettier inside code-block
Fabián Uribe8baa1e137a4a
diff --git a/apps/docs/pages/guides/auth/social-login/auth-google.mdx b/apps/docs/pages/guides/auth/social-login/auth-google.mdxindex 1c71ed2b408..ee774b24fbc 100644--- a/apps/docs/pages/guides/auth/social-login/auth-google.mdx+++ b/apps/docs/pages/guides/auth/social-login/auth-google.mdx@@ -301,21 +301,22 @@ The following code snippet provides an example of how to create both versions in```js// Adapted from https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#converting_a_digest_to_a_hex_string-import crypto from 'crypto';+import crypto from "crypto";-...+// ...-const nonce = crypto.randomBytes(16).toString('base64'); // Generate a random nonce+const nonce = crypto.randomBytes(16).toString("base64"); // Generate a random nonceconst encoder = new TextEncoder();const encodedNonce = encoder.encode(nonce); // Encode the nonce-const hash = await crypto.subtle.digest('SHA-256', encodedNonce); // Hash it with SHA-256+const hash = await crypto.subtle.digest("SHA-256", encodedNonce); // Hash it with SHA-256const bytes = new Uint8Array(hash);const hashedNonce = Array.from(bytes)- .map((b) => b.toString(16).padStart(2, '0')) // Convert the hash to a hexadecimal string- .join('');-+ .map((b) => b.toString(16).padStart(2, "0")) // Convert the hash to a hexadecimal string+ .join("");+// Use 'hashedNonce' when making the authentication request to Google// Use 'nonce' when invoking the supabase.auth.signInWithIdToken() method+```### Configuration [#configuration-personalized-sign-in-button]