Added Google Sign In as a login option.

So many users don't want to create yet another account. Personally, I'd rather Sign in with Google/Facebook/Twitter/Apple if I'm just thinking of checking something out.

I've added Sign in w/ Google to start, as our app is B2B.

Things I considered during this integration:
* Google Sign In for new user --> creates new account
* For existing user but unassociated Google account --> asks user to verify password to merge
* For existing user with associated account --> signs in as expected
Simon Chiu Author

The app is based on #RubyOnRails. All the logic is held in a controller that first checks the email sent back by Google in the OAuth2 response. If email exists, it gives the user a choice to merge with their existing account. If it doesn't, then redirects to the onboarding flow. (And of course if it exists and already set up, just logs the user in.) A fourth scenario would be if the email doesn't match an existing account but the user still wants to associate it with their account -- will need to address this later. It's a rabbit hole 🤷.

0 Likes

How'd you implement?

0 Likes

Please sign in to leave a comment.