[Free] ⭐ Extension to sign-in with Google account

Google Sign-In Extension

Overview

The SignInWithGoogle extension for MIT App Inventor created by MrKoder provides a convenient way for developers to implement Google Sign-In functionality in their Android applications. This extension facilitates the process of obtaining a user's consent, exchanging device codes for access tokens, and retrieving user profile information from Google APIs.

Example Preview

Blocks


2

Features

  • Request device code from Google OAuth2 Flow API using this block :

Description:

Initiates the GoogleSignIn OAuth2 authentication flow using the device code grant type. This flow is suitable for devices that don’t have a web browser or when users can’t easily copy and paste verification codes.

  • Exchange device code for access token in Google OAuth.
  • Request user profile information from Google People API.

Video Preview

Installation

To use the SignInWithGoogle extension, follow these steps:

  1. You can see this video to get your credentials (Client-ID, Client-Secret):
  1. Download the

V1
:arrow_down:AIA file (227.5 KB)** If you want .

V2
:arrow_down:AIA file (4.7 MB)
** If you want .

  1. Or you can Select "Import Extension" and choose the

V1 :arrow_down:SignInWithGoogle.aix (20.8 KB)** file. (you have to use external WebViewer)

V2
:arrow_down:SignInWithGoogle.aix (2.3 MB) (the Auth2 Flow is injected inside the Extension so just click on **StartGoogleDeviceLogin** block)

  1. The extension will be added to your palette, and you can now use its blocks in your project.

Properties

ClientId

  • Description: Set or get the client ID used for Google Sign-In.
  • Type: String

ClientSecret

  • Description: Set or get the client secret associated with the client ID.
  • Type: String

RefreshToken

  • Description: Set or get the refresh token required for token refreshing.
  • Type: String

AccessToken

  • Description: Set or get the access token obtained after successful sign-in.
  • Type: String

Sign-in process

files

:arrow_down:SignInWithGoogle.aix (20.8 KB)
:arrow_down:AIA file (227.5 KB)

my website that has all of my extensions

https://ahmed2300.github.io/extensionslake.github.io/

Donate

if you liked my extension you can support me

11 Likes

Very useful extension

1 Like

I put ClientId and ClientSecret in the file, but the program does not work

see this video please :

And sorry for my late reply I was swamped working on my graduation project for 3 months

I did it but it doesn't work

@mostafa_baghi I have updated the aia and the aix try them and give me your feedback

and thanks for your feedback Also make sure to enable people API of google

Yes, it is in public mode. I tried a lot. But it only worked once and showed name and email. For example, I tried 40 times and 39 times I did not receive any information

This is confusing !
it works very well with me :point_down:

Send me the aia file without ClientId and ClientSecret

Can I get Phone Number from profile Info?

can i do logout with this extention?

No, this extension only get info of Google user account

No, the API doesn't offer the phone number of the user

Can't Sign in

Did you add your client id and client secret from your google cloud in the app
See this video:

Hi, I try the extension but without result when I click it, nothing happens ! :.(

Could you send the aia file or show your project blocks ?

Now Extension is easier than before you just set your ClientID and ClientSecret and click on the authentication flow block:

Video Preview

1 Like