Member-only story

Google SignIn Compose

Aseem Wangoo
ProAndroidDev
Published in
6 min readSep 28, 2021

Google SignIn Compose

Article here: https://flatteredwithflutter.com/google-signin-compose/

We will cover briefly:

  1. Integrating the Google SignIn
  2. MVVM architecture
  3. Using Moshi to send data
  4. (Optional) Check for the previously signed-in user

Note: This article assumes the reader knows about Jetpack Compose

Google SignIn Compose

Integrating the Google SignIn

Prerequisite: You need to have a project inside the GoogleCloudPlatform.

Before we start integrating, we copy the client id (as received from the Google Cloud Platform) and paste it inside our res->strings.xml

Note: See the video above

<string name="google_cloud_server_client_id">YOUR_ID</string>

Setup

  • Install the dependencies inside build.gradle of your app
implementation 'com.google.android.gms:play-services-auth:19.2.0'

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Responses (2)

What are your thoughts?

I think your example is more like VVM, not MVVM becasue you GoogleUserModel is not a Model. Model in MVVM is not data class but it handles business logic.

--

This is an exact copy of my article publish a month ago here. https://hadiyarajesh.medium.com/integrate-google-sign-in-with-jetpack-compose-ui-9f52776542ab
Providing appropriate credit is the true way of open source.

--