Skip to content
Back

[SOLVED] React Native (Expo) Google OAuth not redirecting back to my app

  • 0
  • Resolved
  • 3
  • Android
  • React Native
  • Auth
Danny
3 Aug, 2025, 15:03

Recently, I tested my app and found that the previous hack for the google auth is now not working anymore. After searching and reading docs, I was able to set it up again but now I am unable to redirect back to my app after the google sign in. Attached picture shows the code for the googleAuth. Please Help!

TL;DR
Google OAuth in React Native (Expo) wasn't redirecting back to the app initially, causing it to infinitely load on the Google auth page. Solution: After rebuilding the app multiple times, the issue was resolved.
Steven
3 Aug, 2025, 15:08

What's the deeplink url?

Danny
3 Aug, 2025, 15:11

Ignore the RedirectURL

Steven
3 Aug, 2025, 15:13

And that's the correct project id?

Steven
3 Aug, 2025, 15:14

And this is still your code?

Danny
3 Aug, 2025, 15:14

Using the same project ID and yes, I am still using the same code.

Danny
3 Aug, 2025, 15:19

oh and one more thing to consider, I am developing for Android.

Steven
3 Aug, 2025, 15:26

And what's the page you end up on?

Danny
3 Aug, 2025, 15:27

it stucks here

Steven
3 Aug, 2025, 15:38

Weird the page is blank like that...

Are you able to see what the the url is?

Steven
3 Aug, 2025, 15:38

Maybe using chrome remote dev tools or that some option in the menu in the emulator

Danny
3 Aug, 2025, 15:39

I added a few print statements to check the URL.

Steven
3 Aug, 2025, 15:54

Do you go though Google first?

Danny
3 Aug, 2025, 15:55

Yes, but not anymore. It showed me only once asking for permission to sign in with google. After that, it just showed this.

Danny
3 Aug, 2025, 15:56

Is it working for you?

3 Aug, 2025, 16:05

It adds the email in the users but doesn't redirect.

3 Aug, 2025, 16:19

You can't log the url in your app because that's the first url in the flow; it's not necessarily the email you're ending up on

3 Aug, 2025, 16:25

This one is not from the logs. I copied it from the browserSession which was showing the constant empty page.

3 Aug, 2025, 17:12

You need to see what the URL it's getting stuck on is

3 Aug, 2025, 17:13

It is infinitely loading on the google auth page

3 Aug, 2025, 17:17

I have been trying to get it to work but still no luck😩

3 Aug, 2025, 17:23

Please look into getting the url. Maybe using chrome remote dev tools or that some option in the menu in the emulator

3 Aug, 2025, 17:24

Ok boss🫡

4 Aug, 2025, 06:00

IT WORKEDD!!!! After rebuilding the whole app just 6 times.

2
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