Auth  /  Google sign-in in your app's name

Google sign-in in your app's name

Google's sign-in window names whoever owns the sign-in key. On Onelo's shared key it says "Onelo". With Onelo Pro or Business, Onelo creates a Google key in your app's name for you, so Google shows your app's name. You do not need a Google Cloud account for it. Every sign-in of the app uses the key: the hosted sign-in page, the store and every SDK.

Before you start: your own domain

Google shows an app's name only after it has checked the brand, and it checks only a brand whose sign-in, home page and legal pages are on a domain the brand owns. So connect your app's domain first (your app → Domain, or custom_domain.set_domain). Until then the Google card says so and Onelo does not ask for the key. Your privacy policy and terms must be published on the same domain.

Switch Google on

  1. In the dashboard open your app → Auth → Sign-in providers and switch Google on. Or ask your agent: social_login.set_provider with provider: "google".
  2. The first switch-on asks Onelo for the key. Onelo prepares a Google project in your app's name. The card shows "Setting up".
  3. You add one DNS record: a TXT record on your domain, with the exact name and value the card (and social_login.get_sign_in_keys) gives you. It proves to Google that the domain is yours. Keep it: Google needs it to stay. The card tells you when Onelo sees the record; DNS can take up to 2-3 days to show a new record.
  4. Google checks your brand. That usually takes a few minutes; when Google reviews it by hand it takes 2-3 business days.
  5. Once the key is ready, the card says "On · your app's key" and Google shows your app's name. From then on the switch only shows or hides the Google button.

The agent can read each provider's state with social_login.get_sign_in_keys and ask again with social_login.request_sign_in_key, for example after a rejected key. The dashboard has the same "Ask Onelo again" link on the card.

What buyers see until the key is ready

WhereWhat buyers see
Your live app (production)No Google button. People sign in with password or the e-mail link, so nobody sees "Onelo". The button appears once your app’s key is ready.
Staging and your Sandbox AppThe Google button, signed in with Onelo’s shared key: Google shows "Onelo".
Onelo FreeThe Google button with Onelo’s shared key: Google shows "Onelo". Onelo Pro and Business show your app’s name.

Or use your own Google OAuth client

If you want the key in your own Google Cloud account, create a client there and save it in Onelo instead. While your own key is saved, Onelo does not create one. Google shows your app's name only once you have verified your brand there on your own domain; until then it shows a domain.

  1. Open Google Cloud Console, pick or create a project and set up its Branding.
  2. Create an OAuth client of type Web application.
  3. Under Authorized redirect URIs add exactly the redirect URI your app's Auth tab shows. On Onelo it is https://onelo.tools/api/sdk/auth/oauth/callback.
  4. Copy the client ID and the client secret.

Save it in Onelo

In the dashboard open your app → Auth → Sign-in providers → Use my own key → Google → Use my own, paste the client ID and client secret and save. Or ask your agent: social_login.set_own_credentials with provider: "google". Onelo asks Google first and refuses credentials Google rejects, so nothing broken is saved. The secret is stored encrypted and never shown again.

The next sign-in uses your client. Removing it takes effect on the next sign-in too.

What changes for people who already sign in with Google

Nothing. Google gives a person the same ID under every key, so everybody who signed in with Onelo's shared key lands on the same account under your app's key or your own client. You can switch back and forth.

When something breaks

What happenedWhat you see
Google refuses your own client at a sign-in (deleted client, changed secret)The person sees a sign-in error. You get one e-mail and the Auth tab shows the refusal until a sign-in works again or you save new credentials.
Your own client was deleted in Google Cloud ConsoleOnelo checks your client once a day and tells you the same way.
Google refuses the key Onelo created in your app’s nameOnelo’s operator is told and fixes it; you are not asked to act.
Google rejects the brand (for example legal pages off your domain)The card says why. Fix it, then ask Onelo again.
Your app moves sign-in to another address on the same domainOnelo’s operator adds the new redirect URI to the key Onelo created.
Your app moves sign-in to a different domainThe key was verified for the old domain, so it rests: in production the Google button is hidden, elsewhere Google signs in with Onelo’s shared key. Ask Onelo again on the card (or social_login.request_sign_in_key): you add one new DNS record and Google checks the brand again.
Your app’s domain is removed or lapsesThe key in your app’s name works only on your domain, so it rests: in production the Google button is hidden, elsewhere Google signs in with Onelo’s shared key. Connect the domain again and the key is used again.

Keys in your app's name, Onelo's or your own, are part of Onelo Pro and Business. On a plan without them Google sign-in keeps working and goes back to Onelo's shared key.

Google sign-in in your app’s name — Auth — Onelo Docs