🚀 Join the waitlist now! waitlist.floot.dev
LogoFlootdocs
Social Auth

Google

Configure Google Sign-In for your Floot app on every supported platform.

Google Cloud Platform Setup

Create a new project

Google Cloud Console → Cloud overview (sidebar) → Dashboard → Create project

Create credentials

APIs & Services (sidebar) → Credentials → Create credentials → OAuth client ID

  • Application type > iOS
  • Name > give a meaningful name
  • Bundle ID > can be found:
    • Open the ios folder of your Flutter project in Xcode (right click on the folder → Open in Xcode)
    • Runner (sidebar) → General (tab bar) → Runner (TARGETS sidebar) → Identity → Bundle Identifier
  • App Store ID and Team ID > only if the app is already published on the Apple App Store

→ Create

For iOS you will need to also create a Web client ID. So please head to the Web tab.

When using Supabase Cloud, you need to enable the Skip nonce check option in Google provider on the Supabase Dashboard.

  • Application type > Android

  • Name > give a meaningful name

  • Package name > can be found:

    • Open android/app/build.gradle.kts file → look for (Ctrl/Cmd + F) applicationId
  • SHA-1 certificate fingerprint > follow instructions:

    For local development, the certificate is generally located at ~/.android/debug.keystore (macOS) or C:\Users\{USERNAME}\.android\debug.keystore (Windows).

    In case the certificate is missing or you need a new one for production, you can generate one with this command.

    Make sure to customize it for production!

    Terminal
    keytool -genkey -v -keystore ~/.android/debug.keystore -keyalg RSA -sigalg SHA1withRSA -keysize 2048 -validity 10000 -alias AndroidDebugKey -keypass android -dname "CN=Android Debug,O=Android,C=US"

    You will have a different set of SHA-1 certificate fingerprint for testing locally and going to production. Make sure to add both to the Google Cloud Console. And add all of the Client IDs to Supabase dashboard.

→ Create

For Android you will need to also create a Web client ID. So please head to the Web tab.

  • Application type > Web application
  • Name > give a meaningful name
  • Authorized redirect URIs > options:
http://127.0.0.1:54321/auth/v1/callback
https://<project-id>.supabase.co/auth/v1/callback
https://<your.domain>:54321/auth/v1/callback

→ Create

When using Supabase Cloud, add the web client ID and secret in Google provider on the Supabase Dashboard.

  • Application type > Web application
  • Name > give a meaningful name
  • Authorized redirect URIs > options:
http://127.0.0.1:54321/auth/v1/callback
https://<project-id>.supabase.co/auth/v1/callback
https://<your.domain>:54321/auth/v1/callback

→ Create

When using Supabase Cloud, add the web client ID and secret in Google provider on the Supabase Dashboard.

  • Application type > Web application
  • Name > give a meaningful name
  • Authorized redirect URIs > options:
http://127.0.0.1:54321/auth/v1/callback
https://<project-id>.supabase.co/auth/v1/callback
https://<your.domain>:54321/auth/v1/callback

→ Create

When using Supabase Cloud, add the web client ID and secret in Google provider on the Supabase Dashboard.

This information is shown to the user when giving consent to your app. In particular, make sure you have set up links to your app's privacy policy and terms of service.

APIs & Services (sidebar) → OAuth consent screen → Fill needed infos

Floot App Setup

CFBundleURLTypes

When configuring Google Sign-In on iOS, you'll need to reverse your iOS client ID to use it in the CFBundleURLTypes section of your Info.plist.

Why reverse it?

Apple uses reverse DNS notation for URL schemes (e.g., com.example.app). So we need to convert the Google client ID to that format.

Copy your iOS Client ID from Google Cloud Console, which looks like this:

861823949799-vc35cprkp249096uujjn0vvnmcvjppkn.apps.googleusercontent.com

Remove the domain part: get rid of .apps.googleusercontent.com

861823949799-vc35cprkp249096uujjn0vvnmcvjppkn

Add the domain part to the beginning, in reverse DNS order:

com.googleusercontent.apps.861823949799-vc35cprkp249096uujjn0vvnmcvjppkn

Update the CFBundleURLTypes attributes below into the ios/Runner/Info.plist file.

/ios/Runner/Info.plist
<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <!-- Google Sign In -->
      <string>your_google_ios_REVERSED_client_id</string>
    </array>
  </dict>
</array>

Environment Variables

.env*
# Your iOS Client ID (not reversed)
OAUTH_GOOGLE_IOS_CLIENT_ID=

For iOS you will need to also setup the Web. So please head to the Web tab.

Environment Variables

Flutter .env* file:

# Your Web Client ID
OAUTH_GOOGLE_WEB_CLIENT_ID=

Supabase supabase/.env* file:

# Your Web Client ID
OAUTH_GOOGLE_WEB_CLIENT_ID=
# Your Web Client Secret
OAUTH_GOOGLE_WEB_SECRET=
# Supabase Auth Service callback url to complete OAuth sign-in.
SUPA_AUTH_EXTERNAL_REDIRECT_URI=

SUPA_AUTH_EXTERNAL_REDIRECT_URI

This is the URL that Supabase will redirect to after a successful OAuth sign-in. It should match the Authorized redirect URIs you set in the Google Cloud Console.

http://127.0.0.1:54321/auth/v1/callback
https://<project-id>.supabase.co/auth/v1/callback
https://<your.domain>:54321/auth/v1/callback

OAuth deep link redirection (optional)

Before You Proceed

Only mandatory if you did not provide a custom organization at Floot app creation! More info here!

Google sign-in with Supabase on Web, macOS, Windows, and Linux is done through the OAuth method.

This method of signing in is web based, and will open a browser window to perform the sign in. For non-web platforms, the user is brought back to the app via deep linking, which is already setup by default in every Floot app.

→ Setup OAuth redirection by following this guide!

Environment Variables

Flutter .env* file:

# Your Web Client ID
OAUTH_GOOGLE_WEB_CLIENT_ID=

Supabase supabase/.env* file:

# Your Web Client ID
OAUTH_GOOGLE_WEB_CLIENT_ID=
# Your Web Client Secret
OAUTH_GOOGLE_WEB_SECRET=
# Supabase Auth Service callback url to complete OAuth sign-in.
SUPA_AUTH_EXTERNAL_REDIRECT_URI=

SUPA_AUTH_EXTERNAL_REDIRECT_URI

This is the URL that Supabase will redirect to after a successful OAuth sign-in. It should match the Authorized redirect URIs you set in the Google Cloud Console.

http://127.0.0.1:54321/auth/v1/callback
https://<project-id>.supabase.co/auth/v1/callback
https://<your.domain>:54321/auth/v1/callback

OAuth deep link redirection (optional)

Before You Proceed

Only mandatory if you did not provide a custom organization at Floot app creation! More info here!

Google sign-in with Supabase on Web, macOS, Windows, and Linux is done through the OAuth method.

This method of signing in is web based, and will open a browser window to perform the sign in. For non-web platforms, the user is brought back to the app via deep linking, which is already setup by default in every Floot app.

→ Setup OAuth redirection by following this guide!

Environment Variables

Flutter .env* file:

# Your Web Client ID
OAUTH_GOOGLE_WEB_CLIENT_ID=

Supabase supabase/.env* file:

# Your Web Client ID
OAUTH_GOOGLE_WEB_CLIENT_ID=
# Your Web Client Secret
OAUTH_GOOGLE_WEB_SECRET=
# Supabase Auth Service callback url to complete OAuth sign-in.
SUPA_AUTH_EXTERNAL_REDIRECT_URI=

SUPA_AUTH_EXTERNAL_REDIRECT_URI

This is the URL that Supabase will redirect to after a successful OAuth sign-in. It should match the Authorized redirect URIs you set in the Google Cloud Console.

http://127.0.0.1:54321/auth/v1/callback
https://<project-id>.supabase.co/auth/v1/callback
https://<your.domain>:54321/auth/v1/callback

OAuth deep link redirection (optional)

Before You Proceed

Only mandatory if you did not provide a custom organization at Floot app creation! More info here!

Google sign-in with Supabase on Web, macOS, Windows, and Linux is done through the OAuth method.

This method of signing in is web based, and will open a browser window to perform the sign in. For non-web platforms, the user is brought back to the app via deep linking, which is already setup by default in every Floot app.

→ Setup OAuth redirection by following this guide!

Environment Variables

Flutter .env* file:

# Your Web Client ID
OAUTH_GOOGLE_WEB_CLIENT_ID=

Supabase supabase/.env* file:

# Your Web Client ID
OAUTH_GOOGLE_WEB_CLIENT_ID=
# Your Web Client Secret
OAUTH_GOOGLE_WEB_SECRET=
# Supabase Auth Service callback url to complete OAuth sign-in.
SUPA_AUTH_EXTERNAL_REDIRECT_URI=

SUPA_AUTH_EXTERNAL_REDIRECT_URI

This is the URL that Supabase will redirect to after a successful OAuth sign-in. It should match the Authorized redirect URIs you set in the Google Cloud Console.

http://127.0.0.1:54321/auth/v1/callback
https://<project-id>.supabase.co/auth/v1/callback
https://<your.domain>:54321/auth/v1/callback

OAuth deep link redirection (optional)

Before You Proceed

Only mandatory if you did not provide a custom organization at Floot app creation! More info here!

Google sign-in with Supabase on Web, macOS, Windows, and Linux is done through the OAuth method.

This method of signing in is web based, and will open a browser window to perform the sign in. For non-web platforms, the user is brought back to the app via deep linking, which is already setup by default in every Floot app.

→ Setup OAuth redirection by following this guide!