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
- Selfhost - Starting Docker containers fa...
I am stuck at installing appwrite. Specifically, the containers dont want to start up. The images are downloaded and ready. Dockhand is reporting containers st...
- It says domain already used but I have d...
I accidentally deleted the project in which I used my domain originally (orexia.app) from name.com. Now I am trying to add it to a different project and it says...
- Is this normal in the self host custom d...
when i try to add custom domain to the project did not see this in 1.8.0 ok when pressed the retry it says "DNS verification failed with resolver 8.8.8.8. Domai...