I’m encountering an issue with authentication with google or apple in my Expo React Native app. It was working previously, but it has recently stopped keeping, and I’m now receiving the following error:
Error 400
Invalid success param: Invalid URI. Register your new client (localhost) as a new platform on your project console dashboard
general_argument_invalid
Has there been a recent update or change that could be causing this? Any guidance on resolving this would be appreciated.
Can you provide the function code?
thats the function
`export const loginWithOAuth = async (provider: OAuthProvider) => {
let redirectScheme = makeRedirectUri({ preferLocalhost: true });
//HACK: localhost is a hack to get the redirection possible
if (!redirectScheme.includes('localhost')) {
redirectScheme = ${redirectScheme}localhost;
}
const url = account.createOAuth2Token(provider, redirectScheme); if (!url) return;
const result = await openAuthSessionAsync(url.href, redirectScheme); if ('url' in result) { const resultUrl = new URL(result.url); const secret = resultUrl.searchParams.get('secret'); const userId = resultUrl.searchParams.get('userId'); if (!secret || !userId) return; await account.createSession(userId, secret); } return true; };`
and thats the loginWithOAuth
Just try adding localhost as a platform as the error says in the console
i have it already
the login was working fine previously like i said
The team was working on support for expo go. Maybe something changed in the code for this.
@Steven sorry for the ping. Can you help here? This a new kind of error.
Yeah that's what i want to confirm
Recommended threads
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support 👋 I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...
- I am currently seeking opportunities as ...
Hey! 👋 I'm a Shopify guy. Been building stores for 8+ years. Still haven't lost my mind. Barely. I make stores that don't suck fast, smooth, and actually built...