
While checking the logs for appwrite-worker-mails I see
** docker compose logs -f appwrite-worker-mails
appwrite-worker-mails | Appwrite mails worker v1 has started
appwrite-worker-mails |
appwrite-worker-mails | [notice] Starting worker b5e0cc0d5cc8:8:v1-mails
**
I have updated the required env variables and made sure they being picked up. However my it doesn't seem like any messages are firing off when I use createEmailVerification. Is there anything else I should be looking for?

are you sure the createEmailVerification
api call is executing successfully?

Appears to be, I'm not seeing any errors.

what's your code and what's the response?

function sendVerificationEmail() {
const promise = account.createVerification("/account");
promise.then(
response => console.log(response)
).catch(err => console.log(err))
console.log("ALL DONE WITH SENDING");
}
function signIn(email, password) {
const promise = account.createEmailSession(email, password);
promise.then(
function (response) {
setUser(response); // Success, this is the SESSION object tho?
},
function (error) {
console.log(error);
setUser(null); // Failure
}
);
}


ahhhhh now I have an error hmm
AppwriteException: User (role: guests) missing scope (account)
at Client.eval

You're using then
in these functions. Because of that. Your signIn function will finish executing and return before the API call actually finishes. perhaps you're calling sendVerificationEmail() before you're actually logged in

Whoops, I sent you signIn

I meant to send you signUp

function signUp(email, password) {
const promise = account.create(ID.unique(), email, password);
promise.then(function (response) {
console.log(response); // Success
sendVerificationEmail();
}, function (error) {
console.log(error); // Failure
setUser(null)
});
}

creating an accoun't doesn't create a session

right, I don't want it to. I want to create an account, say "Hey go check your email" and not let them do anything until they verify.

ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

but your saying you have to have a session to send a verification email

and btw, i suggest using async, await, try, catch over then whenver possible. all these nested then's can get really confusing down the line

sure I can migrate to that, was just copy pasting from the docs

yes, correct

hmmm

is there a property to check if the user is verified? I didn't see any on the account object in the docs.

Ya it's emailVerification

this guy appwrites

thank you!

[SOLVED] User (role: guests) missing scope (account)
Recommended threads
- phantom relationships appear on parent c...
i have this bug were my past deleted collection apears as relationship to my parent collection. when i try to delete that relationship from parent it gives me e...
- Attribute stuck on proccessing
i tried creating a new attribute butits stuck on proccessing,i did a hard refresh,cleared cache everything but still stuck on proccessing,also in my functions w...
- Appwrite Cloud Custom Domains Issue
I’m trying to configure my custom domain appwrite.qnarweb.com (CNAME pointing to fra.cloud.appwrite.io with Cloudflare proxy disabled) but encountering a TLS ce...
