Omri Amos Posted June 8 Posted June 8 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. works even better on mobile: 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. Gill, Joel R, Maxxius and 3 others 2 4
Randy Calvert Posted June 8 Posted June 8 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.
Omri Amos Posted June 8 Author Posted June 8 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.
Jim M Posted June 8 Posted June 8 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. Dia Mond and SoloInter 2
SoloInter Posted June 8 Posted June 8 This would allow new registration to be triggered more often. I'm interested.
Omri Amos Posted June 9 Author Posted June 9 (edited) 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 June 9 by Omri Amos
Randy Calvert Posted June 9 Posted June 9 The API creates a local account instead tieing to Google. So that won’t work.
Randy Calvert Posted June 9 Posted June 9 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.
Omri Amos Posted June 9 Author Posted June 9 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..
Omri Amos Posted June 9 Author Posted June 9 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. georgebkk 1
georgebkk Posted June 15 Posted June 15 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
Recommended Posts