0

I am planning to use Google Identity Toolkit and will integrate only with Google Provider (no other providers and no chance in the future too).

Whatever example I have seen, flow is showing "Email First" option.After providing email based on domain, it takes to identity provider site.

Scenario is, if user is not logged in, user is required to enter his email address twice, first on "Email First" page, then on Google Account Page.

As I have, only Google as provider, question is how can I directly redirect user to Google Account, once he clicks Sign-In button, instead of showing him "Email First" page?

Edited

Now I have little change in the flow, the web site I am working with has been integrated with different companies active directory, so once user enter his email address, based on email domain user would be redirected to required company portal for user verification.

Now web site is planning to allow Google accounts and when user enter email address with Google domain, use should be redirected to Google Account Page. Web site owner, does not want to see "Email First" or "Provider First" screen as this is bad user experiences.

MaX
  • 73
  • 6

1 Answers1

0

If you specify displayMode: 'providerFirst' in the widget options, it should work as desired.

https://developers.google.com/identity/toolkit/web/setup-frontend#email_first_vs_provider_first_modes

Why not use Google Sign-In for Websites instead? Since Google is your only identity provider, that seems like your best option. You'd also get first and last names on login which Identity Toolkit doesn't provide.

https://developers.google.com/identity/sign-in/web/

Morley Tatro
  • 56
  • 1
  • 2
  • Thanks @MorleyTatro , I tried using "providerFirst" that worked fine, but site owner does not want to see that page. I have updated my question. Thanks again for your help :) – MaX Apr 30 '16 at 03:22
  • So, why not set up your own "email first" page where you can collect the user's email? If the email domain is "gmail," then trigger the Google Sign-in for Websites popover and the user can authenticate. Otherwise, if the domain matches one of the companies on the list, then send a post to the appropriate login page with the email address. The receiving page could fill in the email address and the user could enter his or her password, thus completing the login process. – Morley Tatro May 03 '16 at 20:12