The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
docs: Add Flutter code sample for Firebase Auth integration guide (#31087)
Tyleraf7d12cedb07
diff --git a/apps/docs/content/guides/auth/third-party/firebase-auth.mdx b/apps/docs/content/guides/auth/third-party/firebase-auth.mdxindex 0bf453afd5d..92d89657837 100644--- a/apps/docs/content/guides/auth/third-party/firebase-auth.mdx+++ b/apps/docs/content/guides/auth/third-party/firebase-auth.mdx@@ -36,6 +36,26 @@ Make sure the all users in your application have the `role: 'authenticated'` [cu</TabPanel>+<TabPanel id="dart" label="Flutter">++Creating a client for the Web is as easy as passing the `accessToken` async function. This function should [return the Firebase Auth JWT of the current user](https://firebase.google.com/docs/auth/admin/verify-id-tokens) (or null if no such user) is found.++```dart+await Supabase.initialize(+ url: supabaseUrl,+ anonKey: supabaseKey,+ debug: false,+ accessToken: () async {+ final token = await FirebaseAuth.instance.currentUser?.getIdToken();+ return token;+ },+);+```++Make sure the all users in your application have the `role: 'authenticated'` [custom claim](https://firebase.google.com/docs/auth/admin/custom-claims) set. If you're using the `onCreate` Cloud Function to add this custom claim to newly signed up users, you will need to call `getIdToken(/* forceRefresh */ true)` immediately after sign up as the `onCreate` function does not run synchronously.++</TabPanel>+<TabPanel id="swift" label="Swift (iOS)">```swift