How to Configure Google Single Sign-On (SSO) in Oracle APEX

 


Introduction

Single Sign-On (SSO) is one of the most convenient ways to simplify authentication in your Oracle APEX applications.

By integrating Google SSO, users can log in using their existing Google accounts — no need to manage separate usernames or passwords.

This post walks you through a complete setup of Google OAuth2 (OpenID Connect) in Oracle APEX and how to make the app show your email address (instead of a numeric ID) as the username after login.

1. Create Google OAuth Credentials

Step 1: Go to Google Cloud Console

1. Sign in with your Google account.

2. Click Select a Project → New Project

3. Give it a name like APEX SSO Project.



Step 2: Enable OAuth API

1. In the left menu, go to APIs & Services → Library.

2. Search for “Google Identity Services” or “Google OAuth2 API”.

3. Click Enable.






Step 3: Create OAuth 2.0 Client ID

1. Go to APIs & Services → Credentials → Create Credentials → OAuth client ID



2. Choose:

  • Application TypeWeb Application

  • NameOracle APEX Login



3. Under Authorized redirect URIs, add this URL:

    Example: https://<your-domain>/ords/apex_authentication.callback




4. Click Create.

    Copy the generated:

  • Client ID

  • Client Secret

2. Configure Oracle APEX

Step 1 : Configure Web Credential under Workspace Utilities



             1. Click Google API Key



             2. Choose Authentication Type : Oauth2 Client Credential




             3. Copy and paste :  Client ID , Client Password.

Step 2 : Open APEX Builder

             1. Go to your APEX workspace.
   
             2. Open your app.

             3. Navigate to: Shared Components → Authentication Schemes

Step 3: Create a New Scheme

             1. Click Create → From Predefined Scheme → Social Sign-In

              2. Choose Google

                1.Fill in the following:
    • Scope →openid email profile
    • Username Sourceemail
         2. Click Next → Create.



Step 4: Make it Active

               1. Click Set as Current for this authentication scheme.

               2. Save and run your app.

Conclusion:

Integrating Google SSO with Oracle APEX improves both security and user experience.
Users can log in instantly using their Google accounts, while developers avoid the hassle of maintaining passwords.

Once configured, APEX automatically handles all OAuth redirections and session management — giving you a secure and seamless sign-in flow.






Comments