I'm trying to create an admin app, when i try to reset the password, here's what i'm getting
here is my code
dap.Client client=dap.Client()
..setEndpoint(endpoint)
..setKey(secretKey)
..setProject(project);
await dap.Account(client).createRecovery(email: email.text,
url:'https://app.xxx.com/recoverpassword?projectid=$project&endpoint=$endpoint').onError((AppwriteException error, stackTrace) {
print('message: ${error.message}');
print('code: ${error.code}');
print('response: ${error.response}');
print('type: ${error.type}');
print('stacktrace: $stackTrace');
return dam.Token($id: '', $createdAt: '', userId: '', secret: '', expire: '');
});
setState(() {
error="";
});
the secret key has all the authorizations
This is client side code?
This is an admin desktop app code The admin can reset password of users using dart_appwrite, the users of this admin app are prompted to enter their secret keys manually to be able to use the app
By the way, client side's reset password doesn't send the link to emails without showing any error (using appwrite )
Try to run it in async
Is this Appwrite cloud or self-hosted?
It is already running in async
Appwrite cloud
anything ?
What's dap?
And why the URL is that complex?
I'm importing dart_appwrite package as dap
I found why no email was sent with reseting the password, it's because i set an smtp that wasn't working BEFORE appwrite pro is here, but after the free plan was on , there was no way to access it and it seems that smtp settings were kept the same, i have to activate pro in order to remove them, then email was working fine after that I think this should be reported as a bug
Email is complex only to include project id and endpoint as parameters
Just tested the mail link now it works fine using client appwrite(appwrite package)
The one with dart_appwrite doesn't work, still, i can manage without it, so thanks anyway
BTW, project ID should be passed automatically - you shouldn’t need to add it yourself. And is the endpoint really different between different reset password requests?
Recommended threads
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...