
Hi again,
I've tried to set up the login process. However, I always get the message: Invalid success param: URL host must be one of: localhost, xxx
I've already followed this comment to setup the login process correctly:
https://github.com/appwrite/sdk-for-react-native/issues/34#issuecomment-3063759130
However, I still get the same error message. When logging the deepLink I get something like:
appwrite-callback-<PROJECT_ID>://
My login function looks like this:
const deepLink = new URL(makeRedirectUri({ preferLocalhost: true }));
const scheme = `${deepLink.protocol}//`;
const loginUrl = await account.createOAuth2Token(
OAuthProvider.Google,
`${deepLink}`,
`${deepLink}`
);
const result = await WebBrowser.openAuthSessionAsync(`${loginUrl}`, scheme);
if (result.type === "success") {
const url = new URL(result.url);
const secret = url.searchParams.get('secret');
const userId = url.searchParams.get('userId');
if (secret && userId) {
try {
await account.createSession(userId, secret);
} catch (error) {
if (error instanceof AppwriteException) {
console.log(error.message);
console.log(error.name);
}
}
}
}
**Server Version: ** 1.7.4 SDK Version 0.11.0
Recommended threads
- Images not showing up --
so i made this movie app - i hosted it successfully using appwrite but the images arent showing up --- https://movie-app-jsm.appwrite.network/ this is the movie...
- What’s the current approach for always o...
Read that it’s not a thing out of the box, but what’s the possible setup here?
- Error 431 header fields too large
Some times to times when i load or switch the page, it shows an error 431. And on what i saw it'w because of the cookies, when i remove the legacy tokens it wo...
