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 SaaS Template.
Overview
The Profile Updation feature in the Next.js Supabase SaaS 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
server.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.
Configuration
To enable email notifications on profile updates, the recipients must be defined in the server.config.ts
file. Example:
By specifying the relevant email addresses, administrators can be informed whenever a user updates their profile.