Skip to content
Back

Oauth Github works, Google redirects to sign in page but on refresh the user is logged in & created

  • 0
  • Auth
  • Web
Jersey Devil
26 Nov, 2024, 08:45

I am new to appwrite the email sign in and github went pretty smooth. Between the docs and some youtube I pieced it together. When I added Google it keeps redirecting to the signin page, but when I refresh it brings up the dashboard. The user is created and everything looks good.

I made the mistake of seeing if Claude could find the problem and it went a little crazy, I'll prob revert those changes and start over. I'm not sure if Google login is messing up because I have it on localhost or if I made a bigger mistake. I thought maybe the cookies weren't coming back fast enough and the middleware was redirecting.

If you can point me in the right direction I would greatly appreciate it, thank you.

server/appwrite https://github.com/djneill/money-guardian/blob/main/src/lib/server/appwrite.ts middleware (AI infected) https://github.com/djneill/money-guardian/blob/main/src/middleware.ts api/routes (AI infected https://github.com/djneill/money-guardian/blob/main/src/app/api/oauth/route.ts auth https://github.com/djneill/money-guardian/blob/main/actions/auth.ts

TL;DR
Oauth Github works, Google redirects to sign in page but on refresh the user is logged in & created. Developer is seeking help with Google login on Appwrite. Possible issues related to localhost setup. Links to relevant code files provided for reference if needed.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more