I recently started using Appwrite and I encountered a problem that I can't solve. I would like to implement signup in SSR with Next.js (and it seems like I managed to do that). However, when I try to send the email verification, I get an error "app.664621fdd@service.cloud.appwrite.io (role: applications) missing scope (account)"
export const signUpWithEmail = async ({
email,
password,
name,
}: {
email: string;
password: string;
name: string;
}) => {
try {
const { account } = await createAdminClient();
await account.create(ID.unique(), email, password, name);
await account.createVerification('http://localhost:3000/verify');
const session = await account.createEmailPasswordSession(email, password);
const maxAge = Number(new Date(session.expire));
cookies().set(SESSION_COOKIE, session.secret, {
path: '/',
httpOnly: true,
sameSite: 'strict',
secure: true,
maxAge,
});
} catch (error) {
throw error;
}
// redirect('/account');
};
If I comment out this line of code, I don't get the error await account.createVerification('http://localhost:3000/verify')
Recommended threads
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Need Help with Google OAuth2 in Expo usi...
I'm learning React Native with Expo and trying to set up Google OAuth2 with Appwrite. I couldn't find any good docs or tutorials for this and my own attempt did...
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...