I want to set the labels at the time user signup to my application , all things work , users data save in auth, updateprefs set , a verification email sent , but unable to set labels bcz in appwrite Account service their is no method for updateLabels, any one can help me using appwrite Function how can i acheive it
Signup.jsx(some code where i do the usercreation ) const create = async (data) => { setError(""); try { await authService.createAccount(data);
await authService.updatePrefs({ role: data.role });
const updatedUser = await authService.getCurrentUser();
const mergedUser = updatedUser? { ...updatedUser, prefs: { ...(updatedUser.prefs || {}), role: data.role }, }: null;
if (mergedUser) dispatch(login({ userData: mergedUser }));
authService.sendVerification();
} catch (error) {
if (error.code === 400) {
setError("Password must be at least 8 characters long.");
} else {
setError("Email already exists.");
}
}
};
Show execution status 500 unable to set labels at signup
I have a signup functionality in my application , where i create a user , save its role using updateprefs , send a verification mail and login in to the application as per their role , but i also want to updatelabels at the time of signup which appwrite AuthService can let me do so i create an appwrite function to updatelabels when user signup
@Steven , your support required.
Recommended threads
- Cloud function deployment failures
When I run appwrite push functions, select the function I want to deploy, confirm with a YES, is starts deploying but goes into error. I need to repeat the ste...
- Failed to create function
Hey everyone 👋 I'm having an issue creating Functions on Appwrite Cloud and I'm not sure if it's a platform bug or something wrong in my project. When I try t...
- Function deployment failed: Unable to re...
Hi Appwrite team, I have been experiencing persistent errors when i attempt to push my appwrite functions. The logs on the deployment detail page on the console...