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
- Frequent 500 Internal Server Errors - Pr...
PROJECT ID: 6951f2xxxxx1ee9e750a REGION: Singapore (sgp.cloud.appwrite.io) PLAN: Pro Our production application experiences **500 Internal Server Errors** mult...
- Issue with Custom SMTP
Hey everyone, I'm facing an issue when updating my Custom SMTP settings on Appwrite Cloud. The UI fails silently (no visual errors), but when checking the cons...
- Problem with Google Workspace at DNS Rec...
Hello, I bought a domain at Namecheap, and Google Workspace used to work there, but now that I switched from Custom DNS to Appwrite's nameservers, it doesn't w...