Manage account settings
Sign out, reset passwords and update a profile.
Before you begin: Create accounts and sign in.
Logout
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Frontbacked.signOut() and Frontbacked.logout() both clear the token from localStorage and sessionStorage. Frontbacked.confirm(message, title?) returns true when the user confirms and false when the user cancels.
Password Reset
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
The method sends { email, path } to /api/password-reset. path is the local page the reset email link should open. The response uses a generic message so account existence is not leaked.
Confirm Password Reset
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
This completes a password reset after the user clicks the reset email link. Frontbacked validates the token before storing the new password.
Update Password
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
The method sends { currentPassword, newPassword } to /api/password. Frontbacked verifies the current password before storing the new one.
Update User Data
Use updateUserData when a signed-in user edits their own profile data stored in the user data JSON.
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
merge defaults to true. When it is true, Frontbacked merges the submitted fields into the existing user data; when it is false, the submitted object replaces the existing user data. Frontbacked validates the final value with the theme's FRL auth block.
Continue with Create and edit records.