[GH-ISSUE #367] Google auth is not working #25560

Closed
opened 2026-04-17 15:50:15 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @himself65 on GitHub (Oct 30, 2024).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/367

Describe the bug

https://discord.com/channels/1288403910284935179/1300894488272699454

To Reproduce
Steps to reproduce the behavior:

Just use next.js example and setup google tokens, shows No stored state found.

Expected behavior
A clear and concise description of what you expected to happen.

Should work

Originally created by @himself65 on GitHub (Oct 30, 2024). Original GitHub issue: https://github.com/better-auth/better-auth/issues/367 **Describe the bug** https://discord.com/channels/1288403910284935179/1300894488272699454 **To Reproduce** Steps to reproduce the behavior: Just use next.js example and setup google tokens, shows `No stored state found`. **Expected behavior** A clear and concise description of what you expected to happen. Should work
GiteaMirror added the locked label 2026-04-17 15:50:15 -05:00
Author
Owner

@LovelessCodes commented on GitHub (Oct 30, 2024):

Google Auth is working as expected.

I've setup a project on a VPS, with a given domain.
Using this project: nextjs-better-auth
Link: Google Auth NextJS Demo

<!-- gh-comment-id:2447311681 --> @LovelessCodes commented on GitHub (Oct 30, 2024): Google Auth **is** working as expected. I've setup a project on a VPS, with a given domain. Using this project: [nextjs-better-auth](https://github.com/LovelessCodes/nextjs-better-auth) Link: [Google Auth NextJS Demo](https://auth.betterjs.dev/)
Author
Owner

@himself65 commented on GitHub (Oct 30, 2024):

yeah it's working

<!-- gh-comment-id:2447930712 --> @himself65 commented on GitHub (Oct 30, 2024): yeah it's working
Author
Owner

@himself65 commented on GitHub (Oct 30, 2024):

I'm not sure why it was not working for me, maybe multiple plugins? I will keep open until I figure out

<!-- gh-comment-id:2447939010 --> @himself65 commented on GitHub (Oct 30, 2024): I'm not sure why it was not working for me, maybe multiple plugins? I will keep open until I figure out
Author
Owner

@himself65 commented on GitHub (Oct 31, 2024):

This seems like the issue when I have different domain for backend and frontend. like a.com for backend and b.com for frontend.

The workaround is to set backend and frontend under the same domain, like auth.a.com and frontend.a.com

<!-- gh-comment-id:2450615176 --> @himself65 commented on GitHub (Oct 31, 2024): This seems like the issue when I have different domain for backend and frontend. like a.com for backend and b.com for frontend. The workaround is to set backend and frontend under the same domain, like auth.a.com and frontend.a.com
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#25560