Access Component and Google Login
The Access Component streamlines the authentication and login function for your App’s users. Based on your needs, you can choose one or more of the different mechanisms that Onymos Access component provides:
- Email & Password based authentication
- Social login with Apple, Facebook, Google and/or Twitter
- Integrate with your own OAuth end-point and optionally use SSO across your different apps
- Integrate with OAuth providers like PingID, Okta, Azure Active Directory
With the Access Component of the Onymos Fabric, it is a simple process to enable your users to login to your app via Google Sign-in. Onymos Fabric abstracts all of the configuration you’d need to support Google Sign-In as part of your app.
Google Login for Android
Support for Google Login/sign-in requires a ‘side-server-app‘ to function as a proxy. To support this, the Onymos Fabric needs one piece of information to create an OAuth2 client and API key for your app to work with Google – the SHA-1 of your signing certificate. (Learn more)
If you don’t have a SHA-1 cert, please follow the instructions below to generate a SHA-1.
If you already have a SHA-1 cert, please use the Customer Portal to enter the data into the Fabric server, then your App will be able to successfully use the Google Login capability.
Generating Google SHA-1 Certificate
In the Terminal, type the following command to create Development keystore:
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10950
We are generating this key with a validity of 10,950 days (approximately 30 years). Google requires the key to be valid at least till 22 October 2033.
You can choose to set the validity to the number of days you prefer, as long as the validity is after 22 October 2033.
You will also be asked several simple questions about you and your company to generate this key. Please answer them correctly, as these will be associated with your app.
Note: Do not change the password or the alias in the above command, as Google expects the exact combination for your Development keystore.
In the Terminal, type the following command to obtain your Development SHA-1 certificate from the Development keystore you just created.
keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
You will be prompted to enter a password for the keystore. Please enter ‘android’ when prompted.
The keytool then prints the SHA-1 fingerprint. It will look something like:
Certificate fingerprint: SHA-1: 00:00:12:34:56:78:90:AB:CD:EF:12:34:56:78:90:AB:CD:EF:00:00
Copy the long colon-separated string above, after ‘SHA-1:’.
Navigate to your Customer Portal page (if you don’t know it, email firstname.lastname@example.org) and paste the value into the Access – Google Login (SHA-1 key) field.
Then try using the Google Login capability from the Onymos Starter App to ensure it works.
Google Login for iOS
For an iOS app, Onymos will automatically create an IOS_URL_SCHEME needed to support Google Login, so no action required.