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
- Getting current user has been blocked
Getting current user has been blocked error while signing in the appwrite console. Got this during I am testing with the my saas web project. Please help to unb...
- Android SDK: Kotlin null Value Not Updat...
Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin **null** values. For example: When I send:...
- Can't connect GitHub — 500 error at the ...
Appwrite Cloud, Pro plan, SFO region. All my Git connections vanished today — Sites and all 15 Functions now show no repository connected. When I try to add a ...