GuidesProfile Management
Update Profile
This guide will help you manage profile updates, including changes to name and email, and trigger email verification in the Next.js Supabase AI Template.
Overview
The Profile Updation feature in the Next.js Supabase AI Template allows users to update their personal information, including their first name, last name and email address. This is a crucial functionality for any application that requires user interaction and personalization.
Features
-
Update Name and Email
- Users can easily update their first name, last name and email address via the profile management section.
- The updated first name and last name is reflected immediately in the user interface, allowing users to see the changes in real-time.
-
Email Verification on Update
- When a user updates their email address, a verification email is sent to the new address.
- The user must verify the new email address before they can use it to sign in.
- Until the verification is completed, the user can continue using their old email address for authentication.
-
Notification on Profile Update
- An email notification will be sent to specified recipients when a user updates their profile.
- These recipients are defined in the
app.config.ts
file, allowing the application to notify administrators or other relevant parties of profile changes if necessary.
This function updates the user's name and email in the database and initiates the email verification process.
By specifying the relevant email addresses, administrators can be informed whenever a user updates their profile.