Skip to content
Back

Google OAuth2 Login on Expo/React Native project

  • 0
  • 1
  • React Native
  • Auth
cafegamer
19 Feb, 2026, 19:34

Does anyone has a guide on how to implement this on a Expo project? I've been trying to implement it, used AI and etc but can't.

  1. Do I have to have a domain/website to redirect back to the app?
TL;DR
The user is facing issues implementing Google OAuth2 Login in their Expo/React Native project. They are experiencing difficulties with the redirect URI, app scheme, and encountering an Expo crypto module error. Eventually, it was revealed that the self-hosted instance was blocking the redirect, and the issue was resolved by correcting the redirect URI. The user also found that using a cloud appwrite project worked better for Google sign-in. The thread also delves into discussions about platform setup, bug possibilities, and self-hosted instances' impact on OAuth. Ultimately, the user was advised to seek help from the company's main developer for further assistance with the self
19 Feb, 2026, 22:30

No You need your app scheme to be appwrite-callback-<projectId>:// and pass it as success and fail param. It should redirect back

20 Feb, 2026, 18:07

again, that's an invalid success param

20 Feb, 2026, 18:07

I created a site template using the react template and for some reason I'm getting a 404 nginx error, even though the deployment was successful

20 Feb, 2026, 18:07

so 2 problems happening

20 Feb, 2026, 18:08

<@1276628406288519234> can't use an uri for redirecting back to the app and can't create a site to redirect (at least using appwrite)

20 Feb, 2026, 18:08

also, can you link me the documentation on this?

20 Feb, 2026, 18:09

You also need to add that domain as a platform in the overview section.

20 Feb, 2026, 18:09

let me check

20 Feb, 2026, 18:10

Select react native

20 Feb, 2026, 18:11

Self hosted?

20 Feb, 2026, 18:11

yes

20 Feb, 2026, 18:12

I cannot help much more than this in self hosted. Cause I dont know anything about it.

20 Feb, 2026, 18:12

If its on the code part I can

20 Feb, 2026, 18:24

<@1276628406288519234> I added the appwrite-callback-<projectId> as a React Native platform, changed the scheme to appwrite-callback-<projectId> on the app.config.js too. And on the redirectUri const redirectUri = appwrite-callback-${config.projectId}://;

even have a console log after this to check if it's correct and still got the invalid success param

tried prebuilding again and nothing

20 Feb, 2026, 18:25

maybe I have to wait for the platform to load?

20 Feb, 2026, 18:27

In react native it does not need to wait. It just checks the scheme and allows anyway. Maybe it has something to do with your bare react native project.

20 Feb, 2026, 18:27

In the console log Was the scheme updated?

20 Feb, 2026, 18:43

it seems both platforms I have for Android React Native are not shown on the available success params

20 Feb, 2026, 18:44

do I have to prebuild every time I change the scheme? and how can I check if the scheme was updated?

20 Feb, 2026, 18:52

Do I have to do anything after creating it?

20 Feb, 2026, 22:33

Nope

20 Feb, 2026, 22:35

Yes And Go to browser and try writing the scheme It will show something like 'Open this app'. And if it does, the scheme works

21 Feb, 2026, 21:31

the problem seems to be just the platform creation

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