Back

[SOLVED] google auth does not work only for mobile

  • 0
  • Users
  • Accounts
  • Cloud
kstulgys
11 Jun, 2023, 12:50

I have implemented Google auth which works fine with a browser but for some reason it does not work only when I open a website on mobile device. How is this possible? I though it's might be only me but me and my friends tried with chrome and safari on mobile and same issue. No problem on desktop browser though. Any ideas?

TL;DR
The user was having an issue with Google authentication not working on mobile devices. They asked if their domain needed to start with "appwrite" and if they needed to change the connection and URI in the Google console. Another user mentioned that the problem might be related to third-party cookies and referred them to the documentation on custom domains. In the end, the issue was solved, but the solution was not mentioned in the thread.
Drake
11 Jun, 2023, 17:56

You might be running into a problem with 3rd party cookies. See https://appwrite.io/docs/custom-domains

kstulgys
11 Jun, 2023, 19:00
  1. Does my domain needs to start with appwrite like appwrite.my-app.com ?
  2. Do I need to change the connection to i.e:
TypeScript
const client = new Client()
  .setEndpoint(https://appwrite.my-app.com/v1)
  .setProject(process.env.NEXT_PUBLIC_ENDPOINT!);
  1. Do I ned to change in google console URI from https://cloud.appwrite.io/v1/account/sessions/oauth2/callback/google/647de70a6139cddef6d2 to https://appwrite.my-app.com/v1/account/sessions/oauth2/callback/google/647de70a6139cddef6d2

?

kstulgys
11 Jun, 2023, 20:15

It means yes?

kstulgys
11 Jun, 2023, 20:15

all 3?

D5
11 Jun, 2023, 21:43

Yes

kstulgys
12 Jun, 2023, 14:18

solved

Drake
12 Jun, 2023, 14:26

[SOLVED] google auth does not work only for mobile

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