Overview
Learn how to update your account details and verify the changes in Credenza.
Displaying Update Account Page programmatically
To display the Update Account page programmatically in Credenza, you can use the passport.openUI function. This function allows you to navigate to different pages within the application using code.
To open the Update Account Page, use the following code snippet:
passport.openUI(Passport.pages.UPDATE_PROFILE);
The passport.openUI function takes a parameter specifying the page to navigate to. In this case, Passport.pages.UPDATE_PROFILE is used to specify the Update Account page.
Update Account Information
Edit Personal Details
To edit your personal details, click on the Update your account details link on the account details page.
On the profile update page, you'll see textboxes for First and last name, Email address, and Phone number. Enter your updated details in these textboxes.
Save Changes
After filling out your first and last name, email address, and phone number, click the Update profile button to save your changes.
If you decide not to save the changes, click the Back link to return to the previous page.
Verify and Confirm Changes
Enter Verification Code
On the verification page, you will find a Textbox labeled Email Code. Enter the code sent to your email into this Textbox.
After entering the code, click the Button labeled Verify to confirm your personal data.
Verify your email
Verification helps keep your data secure. Enter the code sent to your email to confirm your information.
Confirm Data
To confirm your personal data, enter the verification code sent to your email in the Email Code textbox. Click the Verify button to submit the code. If you need to make further changes, use the Update your account details link to return to the profile update page.
Programmatic Account Updates
You can update your account details programmatically using the updateProfile and confirmAccount functions provided in the API. Follow the steps below to execute these functions.
Updating Profile Information
Use the updateProfile function to modify details such as your first name, last name, email address, and phone number. Below is an example of how to use this function.
await passport.updateProfile({ name: 'John Doe', email: 'john@example.com' });Confirming Account Changes
After updating your profile, you need to verify the changes. Use the confirmAccount function to enter the verification code sent to your email. Below is an example of how to use this function.
await passport.confirmAccount({ phoneCode: '123456', emailCode: 'abcdef' });