Hello (again ;-))
I am trying to verify an user password with flutter. The user is created correctly and the email is sent to the correct account. When the user clicks on the link a 401 error User (role: guests) missing scope (global) general_unauthorized scope is shown The user has a valid session Any help is greatly appreciated
verify user password? What do you mean?
and where are they being redirected to after clicking?
that URL doesn't look right 🧐 it should contain the secret?
It does. I think discord sanitizes the pasted link
anyways....that's your app page? what's the code on that page?
{
Future<bool> createUser(
{required String email,
required String password,
required String name}) async {
try {
await _account.create(
userId: ID.unique(), email: email, password: password, name: name);
await _account.createEmailSession(email: email, password: password);
await _account.createVerification(url: AppwriteConfig.verifyUrl);
//await signInWithEmail(email: email, password: password);
return Future.value(true);
} catch (e) {
currentUser.value = null;
isAuthenticated.value = false;
_errorHandler(e);
return Future.value(false);
}
}
}
Dumb question, is the verifyEmail Endpoint an appwrite default endpoint or do I have to code it?
Btw, it's best to use 3 back ticks with multi-line code. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting
You need to implement that. The url you pass into the create verification call should the url of your page where you can extract the secret from the url and then call the 2nd part of the verification flow
Lol, I was afraid so after re-reading the docs. Can a function be used, or I literally have to implement a website to call the page from an android flutter app?
You can also deep link
Recommended threads
- Authentication on custom Websocket Serve...
Hi, I want to use a custom Websocket Server (using Bun) for my application. However I cant really figure out authentication on custom servers. Session cookies ...
- Realtime: Listener not triggered on upda...
I self host appwrite 1.8.1. The genereal functionallity works fine. But my realtime subscription isn't updating. I see "Received heartbeat response from realtim...
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...