
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
- Email Verification Delay Issues - Need H...
Hi everyone! I launched my product yesterday after testing, and I'm seeing users drop off during email verification. Initially thought users didn't like the pro...
- Im getting stuck adding appwrite to reac...
I'm new to the app development scene and am trying to learn fast through tutorials and stuff. One that I am following is outdated in terms of using appwrite. I'...
- Trigger-Based Email Notification for Dat...
I'm developing a clinical website with an intake form. When users submit their information, it's automatically stored in Appwrite's database. I'd like to set ...
