# Redirect URI issue in Wix Headless React Native

**URL:** <https://forum.wixstudio.com/t/redirect-uri-issue-in-wix-headless-react-native/64568>\
**Category:** Ask the community\
**Tags:** wix-auth, wix-headless, code, wix-studio\
**Created:** [November 12, 2024, 10:31am UTC](https://forum.wixstudio.com/t/redirect-uri-issue-in-wix-headless-react-native/64568 "2024-11-12T10:31:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://forum.wixstudio.com/u/Brian_Lewis)\
**Post date:** [November 12, 2024, 10:31am UTC](https://forum.wixstudio.com/t/redirect-uri-issue-in-wix-headless-react-native/64568/1 "2024-11-12T10:31:00Z")

</div>

**Issue:** Getting an “Invalid redirect URI” error after building the APK in Expo, even though development URLs work fine.

**Project Context:**

- I’m using a Wix headless React Native template with Expo for development.
- During development (using Expo), my OAuth URLs are configured and work like this:  
\*\* Allowed Redirect Domains: exp://172.16.0.181:8081  
\*\* Allowed Authorization Redirect URIs: exp://172.16.0.181:8081/–/oauth/wix/callback

**Problem:**  
After building the APK in Expo for production testing, I updated the URLs to a production format that matches the app’s configuration, but they don’t work as expected.

**Production URL Setup:**  
• Allowed Redirect Domains: myApp://oauth/wix/callback  
(where “myApp” is the app-specific URI scheme defined in my app.json file)  
• Allowed Authorization Redirect URIs: myApp://oauth/wix/callback

**What I Tried:**  
Setting only “Allowed Authorization Redirect URIs” without “Allowed Redirect Domains” didn’t resolve the issue either.

**Observed Behavior:**  
When I enter incorrect login credentials, the app correctly displays an “Email or Password is invalid” message.  
However, with valid credentials, I receive an “Invalid redirect URI” error in response to the code below:

let response = await myWixClient.auth.login({  
email: MEMBER\_EMAIL,  
password: MEMBER\_PASSWORD,  
});
