Simple Google Sign-In

Hippo

(0)
$9 $18
ENDS SOON ! -50%
Publisher Hippo
File size 62.59kB
Number of files 37
Latest version 4
Latest release date 2024-10-19 03:43:13
First release date 2023-03-26 09:48:13
Supported Unity versions 2018.4.2 or higher
Simple Google Sign-In provides Google sign-in with OAuth 2.0 for Android, iOS, Windows, Mac, Universal Windows Platform (UWP) and WebGL apps made with Unity.

Authentication may be a headache, especially for beginners, especially on different platforms. So I decided to take a fresh look of current possibilities that Google and Unity provides at the moment. And after a week of research I said "Bingo!". My asset is an extremely simple solution with about 200 lines of code only. Lightweight, tiny and clean, with no massive plugins and 3rd party libs!

Benefits:
● Cross-platform user auth for cross-platform games and apps
● No plugins, not 3rd party libs, no dependencies
● No impact to build size
● More security for client-server apps (get access token on a client, get all user data on a server to avoid tampering)

Setup steps:
Please visit our GitHub for setup instructions.

How it works for Android, iOS, Universal Windows Platform:
● Request auth code with redirecting to the app using deep linking
● Receive auth code by handling Application.deepLinkActivated
● Exchange auth code for access token using UnityWebRequest
● Get user info (OpenID, name, email) using access token with UnityWebRequest

How it works for Windows and Mac:
● Request auth code with loopback to localhost
● Receive auth code by listening localhost using System.Net.HttpListener
● Exchange auth code for access token using UnityWebRequest
● Get user info (OpenID, name, email) using access token with UnityWebRequest

How it works for WebGL:
● Request access token with redirecting by URL (the app will be launched in a new browser tab)
● Get access token from Application.absoluteURL
● Get user info (OpenID, name, email) using access token with UnityWebRequest

Support:
GitHub - wiki
GitHub - bugs & requests
Discord - questions, live chat with developers

It would be super awesome if you rate ★★★★★ our asset and leave your feedback! Your reviews inspire us for creating and improving our assets. Thanks and good luck with your projects!

Top Publisher Assets