I'm trying to login a User using google auth after setting up everything in the google cloud console still the user that doesn't exist in the appwrite gets redirect to the dashboard page instead of signup page below is the code.
`import { Client, Account, ID } from "appwrite";
import config from "../conf/config";
const client = new Client();
const account = new Account(client);
client.setEndpoint(config.appwriteURL).setProject(config.appwriteProjectID);
export class authService{
oAuth(){
try {
account.createOAuth2Session('google','http://localhost:3000/dashboard', 'http://localhost:3000/signup')
} catch (error) {
console.log(error)
return false
}
}
}
const authServices = new authService();
export default authServices;`
`"use client"
import authServices from "../../authentication/auth";
import styles from "./styles.module.css";
import { useState } from "react"
import { useRouter } from "next/navigation";
const Login = () => {
const googleAuth = (e) => {
e.preventDefault()
try {
authServices.oAuth()
} catch (error) {
console.log(error)
}
}
return (
<div className={styles.Login}
<h3>Login Using Google</h3>
<button onClick={(e) => googleAuth(e)}>Google Login</button>
</div>
)
}
export default Login;`
