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
- Impossible to get USER after createEmail...
Am using provider to deal with functions linked to appwrite. Here is my login. Future<String?> login(String email, String password) async { try { aw...
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...