Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of Google One Tap login with the Google login provider #39

Open
jamesevans1808 opened this issue Jul 3, 2024 · 3 comments
Labels

Comments

@jamesevans1808
Copy link

jamesevans1808 commented Jul 3, 2024

Question

I'm trying to get the Google One Tap auth functionality (the little pop up that appears in the top right of the page if you're logged into your Google account in your browser) working with the Google login from this plugin. I'm just unsure what URL I should be passing in as the login uri, as the formie.io one for local development doesn't seem to work. Here's an example of the snippet I am using to set it up below, with data-client_id and data-login_uri replaced due to being sensitive data:

<div id="g_id_onload"
     data-client_id="a.apps.googleusercontent.com"
     data-context="use"
     data-login_uri="https://formie.verbb.io?return=https://cms.test.loc/actions/social-login/auth/callback"
     data-auto_select="true"
     data-close_on_tap_outside="false"
     data-itp_support="true">
</div>
<script src="https://accounts.google.com/gsi/client" async></script>

Any help would be greatly appreciated, even if it is just integrating this with Craft.

Many thanks

Additional context

https://developers.google.com/identity/gsi/web/guides/offerings

https://developers.google.com/identity/gsi/web/tools/configurator

@engram-design
Copy link
Member

I've not had experience with Google One Tap login, but I'll look into it!

@jamesevans1808
Copy link
Author

I've not had experience with Google One Tap login, but I'll look into it!

Nice one, thank you! I did make some headway in implementing it myself, but I ended up banging my head against a wall when it came to proper verification of the token.

@jamesevans1808
Copy link
Author

@engram-design

I've managed to get this working outside of the social login plugin following the instructions listed here: https://developers.google.com/identity/gsi/web/guides/verify-google-id-token#php

Hopefully this is helpful for you guys as it was for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants