Google One Tap
I didn't know about this but its really interesting! Thanks for raising this.
Yep, I'm starting to see it used more and more around the web. And the stats I've seen around it show that it has a substantial improvement on signups.
also interested to see the best method of implementation is
I'm really curious as well how you would implement something like this with next-auth.
Anyone still waiting?
I've just looked at this video https://youtu.be/qS4dY7syQwA and got some ideas how to integrate it into NextAuth.js
I cannot say I'll prioritize it, but I happily reopened the issue to track this.
If anyone wants to jump on it and try to implement, please do!
We at hypersay.events already have one-tap implemented with next-auth. It's a matter of creating a custom credentials provider. If anybody is interested I could try to write an article.

Hi Fabrizio, I am definitely interested and would appreciate and assistance in this regard. Thanks!
On Fri, Oct 1, 2021 at 1:24 PM Fabrizio Ruggeri @.***> wrote:
We at hypersay.events already have one-tap implemented with next-auth. It's a matter of creating a custom credentials provider. If anybody is interested I could try to write an article. [image: Screenshot_20211001_132219] https://user-images.githubusercontent.com/324687/135612033-e1c455c0-4768-4e44-b24a-40d9a1adbb88.png
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nextauthjs/next-auth/issues/1058#issuecomment-932145171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2NP4W7BSYWPIS43VZUF53UEWK5RANCNFSM4VY6VQIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
@ramiel please do! Email me or write me on twitter if you need any details, I would like to have a look!
@ramiel Please help us all!
👍 I'm going to wrap up everything in the next few days.
I got a sneak-peak of @ramiel's post, and it's super nice! 👀 I think we can add support for it and have it integrated (partially) into the core. There will be a small code snippet to copy for the front-end part, but not that bad!
Awesome thanks so much
On Sun, 03 Oct 2021 at 02:05, Balázs Orbán @.***> wrote:
I got a sneak-peak of @ramiel https://github.com/ramiel's post, and it's super nice! 👀 I think we can add support for it and have it integrated (partially) into the core. There will be a small code snippet to copy for the front-end part, but not that bad!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nextauthjs/next-auth/issues/1058#issuecomment-932836822, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE2NP4S5XHH52ZADEISTQ3TUE6M47ANCNFSM4VY6VQIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
And finaly here the tutorial: https://www.ramielcreations.com/next-auth-google-one-tap
Many thanks to @balazsorban44 for help and suggestions
Fantastic, thanks @ramiel & @balazsorban44, will try it out later this evening. Appreciate your efforts!
https://twitter.com/nextauthjs/status/1444604464837632001 🙌
@keslert it is now! :slightly_smiling_face: I will close this for now, but we might revisit it in the future if we could provide better integration or even built-in support. Busy with other stuff, so don't hold your breath. ut @ramiel's article should get you started.
Awesome, thanks @ramiel!
Hi @balazsorban44 & @ramiel,
Thanks for the tutorial. I got pretty far but encountered the following issues:
- Upon authenticating, the one-tap window reopens.
- The Session object returns an empty "user" object.
https://user-images.githubusercontent.com/20240370/135831893-5602d2b0-6a81-4029-905c-aaf42bda096a.mp4
Notes:
- I used Next-Auth version 3, not the new beta 4.
- I used a custom DB connection for sake of testing. (Data gets loaded to the MongoDB DB just fine. No problems there)
What am I missing/doing wrong that prevents the authentication from completing? My code is available here: Google One-Tap using Next-Auth
If possible, could you provide a minimum working solution to Github that we can download and work from?
Thanks in advance
Hello @asdutoit I had a look at your code an I think you're returning an array of users instead of a single one from your DB.
const user = await db.collection("users").find({ email }).toArray();
// later you return an array (the name of the variable is misleading)
return user
Also your code is not correct because you're defining the user as const on line 101 and then trying to reassign on line 107.
I think you should use findOne instead of find
let user = await db.collection("users").findOne({ email })
if (!user) {
user = await db.collection("users").insertOne({
name: [given_name, family_name].join(" "),
email,
image,
emailVerified: email_verified ? new Date() : undefined,
});
}