Jump to content

Featured Replies

Posted

Hi,

Is there a way to add "Google One Tap", which is the sign-in with google popup that shows up automatically on page load?

You can find it on many sites, like Stackoverflow, Medium, Kayak, Linkedin, and other large websites.

1*-SGf5TVL08fqbDnPbuxUWA.png

 

works even better on mobile:

nueva-portada-enero-2-6.jpg

This is the code to call the pop:

<script src="https://accounts.google.com/gsi/client" async defer></script>
<script>
  function handleCredentialResponse(response) {
    // Handle the response from Google One Tap
    console.log("Encoded JWT ID token: " + response.credential);
    // Add your logic to handle the credential response
  }

  window.onload = function() {
    google.accounts.id.initialize({
      client_id: 'YOUR_CLIENT_ID',
      callback: handleCredentialResponse
    });
    google.accounts.id.prompt(); // Display the One Tap prompt
  };
</script>

 

Is it possible to integrate this with Invision Community's sign up/in form?
I already have the "signin with google" obviously, but I really want to trigger this popup when a gues comes to my website.

 

There is no pre set option to do this, but you could certainly look at editing your theme to add the code. You’ll most likely need to wrap it in template logic to only show it to guests. 

  • Author
47 minutes ago, Randy Calvert said:

There is no pre set option to do this, but you could certainly look at editing your theme to add the code. You’ll most likely need to wrap it in template logic to only show it to guests. 

I have no problem adding it to my theme, also include the logic to show it only to guests.

However, I'm not sure how to implement the actual registeration/login after I received the token from google.

 

This is not possible in our software at present. If you would like to suggest it for the future, I can move this to our Feedback forum. Please let us know.

This would allow new registration to be triggered more often. I'm interested.

  • Author
13 hours ago, Jim M said:

This is not possible in our software at present. If you would like to suggest it for the future, I can move this to our Feedback forum. Please let us know.

ok 🫠

Is it possible for me to have this on my website, and then just create a new user on the forums with an API call? I'm look at this: https://invisioncommunity.com/developers/rest-api?endpoint=core/members/POSTindex

Only problem is that I will have to choose a password for him, instead of him being able to login with Google... maybe there's a way around this?

 

Edited by Omri Amos

The API creates a local account instead tieing to Google. So that won’t work. 

Here’s a stupid question… why not simply make a modal popup yourself and link it into the existing signup with Google workflow?  This would not show the user’s existing Google accounts but would be that “in your face” prompt. 

Otherwise you might need to engage a 3rd party resource developer to create a new login method for you. 

  • Author
5 hours ago, Randy Calvert said:

The API creates a local account instead tieing to Google. So that won’t work. 

I will take a look at the db to figure out how google-accounts users are stored in the database, I bet I can replicate that..

 

I would suggest looking at:

 

  • Author

Thank you.
I noticed that what I'm looking for is probably in the 'core_login_links' table.
I will take a look at this link as well.

 

On 6/10/2024 at 1:08 AM, Omri Amos said:

Thank you.
I noticed that what I'm looking for is probably in the 'core_login_links' table.
I will take a look at this link as well.

 

 

Please let us know how it goes. I need Google One Tap on my board!

Cheers

I hope at least IC5 version will get this.

Recently Browsing 0

  • No registered users viewing this page.