Onymos Access and Google Sign-In
The Access Feature streamlines authentication and login functionality for your app’s users. Based on your needs, you can choose one or more mechanisms that Onymos Access provides:
- Email & Password-based authentication
- Social login with Apple, Facebook, or Google
- 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 Access, it’s a simple process to enable your users to log in to your app via Google Sign-In.
Google Sign-In for Android
Support for Google Sign-In requires a ‘side-server-app‘ to function as a proxy. To support this, Onymos 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 certificate, please follow the instructions below to generate one.
Generating Google SHA-1 Certificate
In the terminal, type the following command to create a 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 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 — please enter ‘android.’
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
Now, you’re ready to log in with Google!
Google Sign-In for iOS
For an iOS app, Onymos will automatically create an IOS_URL_SCHEME needed to support Google Sign-In, so no action is required.