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
- Docker Compose MongoDB Setup
everythings work fine but the mongodb fails on startup everytime. log: ``` Generating random MongoDB keyfile... /bin/bash: line 9: : No such file or directory ...
- Auth broken after update from 1.8.0 to 1...
So ive been having issues creating, deleting or updating users on my appwrite instance after i updated from 1.8.0 to version 1.9.0. When trying to create a user...
- Websocket error Realtime
Hi peeps, I am trying to create realtime updates and I am having websocket error Code is below this msg