---
title: "Getting started with Flutter authentication"
description: "This tutorial shows how to add Google authentication to a cross-platform Flutter application using the Supabase SDK for Flutter. It explains OpenID Connect as a protocol built on OAuth 2.0, then configures Google Cloud client IDs for iOS, Android, and web, with Supabase using the web client ID to verify the supplied identity token. The sample initializes Supabase, starts Google sign-in through google_sign_in, passes the resulting access and ID tokens to signInWithIdToken, and listens for signed-in events to navigate from LoginScreen to ProfileScreen. The profile reads avatar_url and full_name from Supabase userMetadata, while a sign-out action returns the user to the login screen, producing a basic personalized app."
---

# Getting started with Flutter authentication

[Supabase](https://yomu.fyi/company/supabase) · tyler\_shukert · Jul 18, 2023

**Type:** Tutorial

## Summary

This tutorial shows how to add Google authentication to a cross-platform Flutter application using the Supabase SDK for Flutter. It explains OpenID Connect as a protocol built on OAuth 2.0, then configures Google Cloud client IDs for iOS, Android, and web, with Supabase using the web client ID to verify the supplied identity token. The sample initializes Supabase, starts Google sign-in through google\_sign\_in, passes the resulting access and ID tokens to signInWithIdToken, and listens for signed-in events to navigate from LoginScreen to ProfileScreen. The profile reads avatar\_url and full\_name from Supabase userMetadata, while a sign-out action returns the user to the login screen, producing a basic personalized app.

## Context

The article addresses implementing third-party Google authentication in a Flutter application, including the use of OpenID Connect identity tokens and displaying basic user information after sign-in.

## Approach / What changed

The sample configures Google client IDs in Google Cloud and Supabase, initializes Supabase in Flutter, uses google\_sign\_in to obtain access and ID tokens, submits them with signInWithIdToken, and provides login and profile screens with authentication-state navigation and sign-out.

## Takeaways

- Supabase's signInWithIdToken method accepts the Google ID token and access token, then makes the token's content available through the Supabase user's userMetadata.
- The Supabase Google provider configuration uses the web client ID as an Authorized Client ID; Android and iOS client IDs are configured for their respective platforms.
- The sample's ProfileScreen displays avatar\_url and full\_name from userMetadata and returns to LoginScreen after calling supabase.auth.signOut().

**Tags:** [Android](https://yomu.fyi/topic/android), [Authentication](https://yomu.fyi/topic/authentication), [iOS](https://yomu.fyi/topic/ios)

- Source: [Supabase](https://supabase.com/blog/flutter-authentication)
- Source URL: https://supabase.com/blog/flutter-authentication
- Ingested by Yomu: 2026-08-29T01:18:45.276Z

[Read original post](https://supabase.com/blog/flutter-authentication)
