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
- Custom Email Templates Not Updating for ...
I have 4 custom email templates on my self-hosted Appwrite instance: - email verification - reset password - security alert - 2FA verification. email verifica...
- Table contents missing (attributes+rows)
Here is an image of the cloud and the attributes that should exist Some of the table do have the data but others dont. I am able to access the rows via api c...
- Docker compose down command is deleting ...
I just followed the steps in the website...but docker compose down seems to delete whole data...it is like fresh installation. Please check if i am missing anyt...