$4.99
Description
If you integrate Google Login to your app – according to statistics https://www.google.com/search?q=google+users+number&oq=google+users+number – you will allow easy onboarding of more than half of the Internet Users. This is why I offer a Micro Service that does it – [for Apps developed by me under Program Tom Ltd].
Google Login Integration
There are multiple ways to integrate with Google APIs. This Micro Service uses a google.client.id. from the Cloud Console -> APIs & Services -> Credentials.
- The Security of the key is – white list of Server IPs from where it could be used.
- Client ID from Web Application – with White list of Domain Prefixes – where the app is located/served from.
Presentation
The login is implemented with included Google Script: <script src=”https://accounts.google.com/gsi/client” async defer></script> and a button with two actions:
- presentation that happens on open page:
<div id=”g_id_onload”
data-client_id=”your client id.apps.googleusercontent.com”
data-context=”use”
data-ux_mode=”popup”
data-callback=”onSignIn” data-auto_select=”true”
data-use_fedcm_for_prompt=”true”
data-itp_support=”true”>
</div>
- and a login button, if the user closes or cancels the dialog.
<div class=”g_id_signin”
data-type=”standard”
data-shape=”rectangular”
data-theme=”outline”
data-text=”continue_with”
data-size=”large”
data-callback=”onSignIn”
data-locale=”en-US”
data-logo_alignment=”left”
data-use_fedcm_for_prompt=”true”>
</div>
Google API Check & Response
This Micro Service recieves a JWT Token after successful user – Google Login and the backend checks it againts Google Servers. If the Token is Valid – the result will be a Valid Internal JWT pair. I’ve developed separate Micro Service for generating in app JWT Token Pair – Refresh and Access Tokens: https://programtom.com/dev/product/jwt-token-app-micro-service/.
Empty Page
This Micro Service has a hard-coded list of sub-domains or apps – that will have Google Login Integration. All attemps to use login from other domains/subdomains – will result in an empty page from this Module.