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
- Vulnerabilities !!!
Why i can't mail to security@appwrite.io
- [Solved]
I have github student account. The auth has been paused however the database is working fine. I cant see any option to resume from my console panel. It is just ...
- [Solved] Appwrite project paused
I have github student account. The auth has been paused however the database is working fine. I cant see any option to resume from my console panel. It is just ...