getting the following response //verification response { "message": "User (role: guests) missing scope (account)", "code": 401, "type": "general_unauthorized_scope", "version": "1.6.1" } when trying account.createverification commenting out createverification funtion,everything works fine
verify-email/page.tsx
I believe after creating the account you need to create a session, once that session is established you can send verification.
So right now, the issue is that there is no session set in the instance. So it is effectively a "guest"
how can i wait for the session
wym?
I guess what I would do would be do something like this
- Create Account
- Create Session based on credentials passed to create account
This will navigate you to a session success route. You can then call the create verification function. Or you can set a banned at the top of the page saying your email hasn't been verified, click here to verify.
thank you ,trying it out, u save my whole week :appwriteheart:
Oh, actually, I'm seeing here createEmailPasswordSession does not have a redirect so you could do
const email = "email@email.com"
const password = "Password1!"
const username = "Kenny"
await account.create(
ID.unique(),
email,
password,
username
);
await account.createEmailPasswordSession(
email,
password
);
await account.createVerification(
'https://locahost:3000/verify-email'
);
added a createEmailPasswordSession as u instructed boss, now its working!:appwriteheart: tysm
Sweet! Glad you got that figured out.
[SOLVED] createverification not working
Recommended threads
- Running into a server error on my self-h...
Hey everyone, I'm running into a server error on my self-hosted setup after updating to v1.19.0. The issue only happens during user creation and deletion. Ever...
- Storage System
Hey guys, quick question regarding massive storage scaling. I’m working in digital forensics and I’m constantly dealing with huge binary disk images, usually be...
- API key without database.read/write
I had some issues with my previous API key and I deleted it then I wanted to create a new one and discovered the database checkbook has no database.read/write j...