Rank 1: Thread
Hi there, I have an issue with Google OAuth login using Ionic / Vue. I tried searching the net for answers but it seems that the information are scarce. Here is my current login code for it:
const loginWithGoogle = () => {
try {
const response = account.value?.createOAuth2Session(
"google",
"http://localhost:8100/home",
"http://localhost:8100/error"
// "http://appwrite.azzotech.com.my/auth/oauth2/success",
// "http://appwrite.azzotech.com.my/auth/oauth2/failure"
);
return { error: undefined, data: response };
} catch (error) {
return { error, data: undefined };
}
};
But I always have this "localhost refused to connect" error. I know I'm doing something wrong but I can't pinpoint it. As I was testing on my self-hosting appwrite, I thought that was the issue, so I configure my cloud.appwrite.io to test and it's the same result. So I know something is wrong my login code. Thanks