Ticker

6/recent/ticker-posts

How to Create a Change Password Page in Oracle APEX - Javainhand Tutorial

change password page in oracle apex

Welcome to Javainhand.com, Today I will describe you how to create a change password page in Oracle APEX. Change Password Page is always a necessary page in the application so that users change their password on a regular basis.

Actually I am writing this post after receiving a comment on my YouTube channel. So thanks to all of you for your valuable commentsClick here for check comment

Let’s Start Today Cover Topic

  • Use of Change Password Page
  • How to Create a Change Password in Oracle APEX?

Use of Change Password Page

Change the password page is useful for the users to change the password on a regular basis. If the user changes application password on a regular basis then you are reducing security risk and prevent your account from hackers. 

Most of the websites have a change password option and follow the password policy to create a strong password on the web. I have already shared an article on password validation in oracle apex. Click here for this reading post.



How to Create a Change Password in Oracle APEX?

In this section, I will describe a full explanation of how to create a change password page in Oracle APEX. I will create a demo application and share every step with a screenshot for better understanding.

Notes:- before adding the change password page in your application you have to add custom authentication. If you have not knowledge about the custom authentication then click here to learn custom authentication in oracle apex.


Step 1:- Add a change password button in your application login screen. You can match the following screen.

 
Step 2:- After adding the change password button now you have to create a simple page or modal dialog page. Here I am creating a simple page. First, you have to change the security authentication option (page is public) on your page. Whenever you call any page before the login you have to change the authentication option otherwise it is always redirected on the login page. You can match the following screen.



Step 3:- Now back on the login page and call the change password page on the change password button.you can match the following screen.

Action:-Redirect to page in this application
Target:- 2(Add your change password page number)



Step 4:- Here I am using the USER_REG table.

CREATE TABLE  "USER_REG" 
   ( "EMAIL_ID" VARCHAR2(100), 
 "MOBILE_NUMBER" VARCHAR2(10), 
 "PASSWORD" VARCHAR2(100), 
 "CONFIRM_PASSWORD" VARCHAR2(100), 
  CONSTRAINT "USER_REG_CON" PRIMARY KEY ("EMAIL_ID")
  USING INDEX  ENABLE
   )
/

Step 5:- On the change password page, I have added three-page items email id, new password, and confirm password. (you can add page items based on your requirements).
Let's take some live application examples, in some of the applications take only email id and password items and in some of the applications take the old password and a new password. 


Step 6:- Now you have to create a button and on that button, Now you have to create a submit button on the change password page. On that button, you have to call the following PL/SQL process.

BEGIN
UPDATE USERS_REG
SET PASSWORD=: P2_NEW_PASSWORD,
CONFIRM_PASSWORD=: P2_NEW_PASSWORD
WHERE EMAIL_ID=:P2_CONFIRM_PASSWORD;
apex_application.g_print_success_message := 'Password Successfully Created';
EXCEPTION WHEN OTHERS THEN
apex_application.g_print_success_message := 'Password Not Updated';
END;

In the above code, I am using a simple update statement with success and error message. You can also modify the above code based on your requirement.

If you like this tutorial then please tell me in the comment box also you can share it with your friends.

Additional Notes:-I am not adding any validation because this article only to understand the process of creating a change password page. If you want to learn oracle apex validation then click on the below links.

Confirm Password Validation in Oracle APEX
Mobile Number Format Validation in Oracle APEX
Password Validation in Oracle APEX
Email Id Validation in Oracle APEX

Post a Comment

1 Comments

  1. Hi,

    How to redirect (force) the end user to the 'change password page' based on a flag column 'Expired pwd'.

    Regards.

    ReplyDelete

If you have any doubts, Please let me know