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
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here 🙂 I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...