I am trying to create an account with google sign in , the account is getting created but i am not able to log it to console and the dispatch method is also not working
const signupWithGoogle = async () => { try { const userData = await authService.OAuth2Login(); if (userData) { const userData = await authService.getCurrentUser(); console.log(userData); if (userData) dispatch(login(userData)); navigate("/"); } } catch (error) { setError(error.message); } };
async OAuth2Login(provider) {
try {
const user = await this.account.createOAuth2Session(OAuthProvider.Google, "http://localhost:5173");
return user;
} catch (error) {
throw error;
}
}
Recommended threads
- [Self-hosted] Realtime crashes with "Mis...
- Regarding Rate Limits
Hello, I am a student engineer who built an internal website for my university club using AppWrite. My club currently has around 500 members, and when I recent...
- Problem adding domain onto the project a...
I have used 2 domains on the project HavanaDev (havanadev.pro and havanadev.com). .com was just redirected to . Pro domain. .pro is expired, now I’d like to use...