for whole code view https://codeshare.io/5XYBMa
//app/store/auth.ts snippet for oauth2
async signInWithGoogle() {
const successUrl = 'http://localhost:3001/success';
const failureUrl = 'http://localhost:3001/login?error=oauth_failed';
try {
await account.createOAuth2Session(
OAuthProvider.Google,
successUrl,
failureUrl,
['profile', 'email'],);
async handleOAuthCallback() {
try {
const session = await account.getSession("current");
const user = await account.get<any>();
const { jwt } = await account.createJWT();
gettting errror result: Object { success: false, error: AppwriteException } error: AppwriteException: User (role: guests) missing scope (account) success: false
Recommended threads
- Database Write Limits hit
Hello Appwrite Admins, I'm a GitHub Education user, and about a week ago, my database was really badly optimized, resulting in about 600k writes in a single day...
- Help: Domain krtrim.tech Blocked on Fast...
Hi, I'm trying to add my domain krtrim.tech (and subdomain) in Appwrite, but I'm getting this error: Failed to add domain to Fastly: {"msg":"Bad request","deta...
- [CLOSED] Any known issues curerntly? dat...
Hi, Any known issues curerntly? database tab is not loading for me