๐Ÿ” Setting Up GitHub Sign-In Authentication in Oracle APEX

๐Ÿ” Setting Up GitHub Sign-In Authentication in Oracle APEX

1. Introduction

Oracle APEX provides built-in support for OAuth 2.0 authentication, making it easy to integrate external identity providers like GitHub. By configuring a GitHub OAuth application and linking it with APEX authentication schemes, users can log in using their GitHub accounts seamlessly. This blog demonstrates a step-by-step setup for enabling GitHub Sign-In in Oracle APEX.

2. Tools and Technologies

To achieve the desired functionality, the following technologies are used:

  • Oracle APEX
  • Github Developer Application
  • Web Credentials (APEX)

3. Business Requirement

In todayโ€™s applications, users expect quick and secure authentication without managing multiple usernames and passwords. Integrating GitHub Sign-In in Oracle APEX allows organizations to: 

  • Enable single sign-on (SSO) for developers and technical usersย 
  • Improve security using OAuth 2.0 standardsย 
  • Reduce user onboarding timeย 
  • Leverage trusted third-party identity providersย 

This approach is especially useful for developer portals, internal tools, SaaS dashboards, and technical communities built using Oracle APEX.

4. Implementation Steps

Step 1: Create a GitHub Developer (OAuth) Application.

  1. Log in to yourย GitHub account
  2. Navigate to:
    • Settings โ†’ Developer Settings โ†’ OAuth Apps
  3. Clickย New OAuth App
  4. Provide the required details:
    • Application Name: Your App Name
    • Homepage URL: Your APEX application URL
    • Authorization Callback URL: APEX redirect URL
  5. Save the application
  6. Note down:
    • Client ID
    • Client Secret

Use the following URL as the Authorized Redirect URI:

For Free Workspace APEX Application:

https://apex.oracle.com/pls/apex/apex_authentication.callback

For Cloud APEX Application:

https://g37a3930ce7a574-ydtygwr0f9tqxelq.adb.ap-mumbai-1.oraclecloudapps.com/ords/apex_authentication.callback

These credentials will be used in Oracle APEX.

Step 2: Set Up Web Credentials in Oracle APEX.

  1. Log in to yourย Oracle APEX Workspace
  2. Navigate to:
    • App Builder โ†’ Workspace Utilities โ†’ All Workspace Utilities โ†’ Web Credentials
  3. Create a new Web Credential
  4. Enter:
    • Client IDย (from GitHub)
    • Client Secretย (from GitHub)
  5. Save the Web Credential

This securely stores your GitHub OAuth credentials in APEX.

Step 3: Configure GitHub Authentication Scheme in APEX.

  1. Go to:
    • Your Application โ†’ Shared Components โ†’ Authentication Schemes
  2. Clickย Createย (or modify an existing scheme)
  3. Chooseย Social Sign-In / OAuth 2.0
  4. Configure the following endpoints:
  • Authorization Endpoint URL
    https://github.com/login/oauth/authorize
  • Token Endpoint URL
    https://github.com/login/oauth/access_token
  • User Info Endpoint URL
    https://api.github.com/user
  • Scope
    user
  • Username Attribute
    email
  • Associate the previously createdย Web Credential
  • Enable the switchย โ€œEnable Authentication Schemeโ€
  • Set this scheme asย Currentย if required

Step 4: Enable Session Support.

Ensure that the authentication scheme has session enabled, allowing APEX to maintain user login state after successful authentication.

Step 5: Implement GitHub Sign-In Button on Login Page.

  1. Navigate to:
    • Your Application โ†’ Login Page
  2. Create a newย Buttonย (e.g.,ย Login with GitHub)
  3. Inย Button Behavior:
    • Action: Redirect to Page in this Application
    • Target Page: Home Page
  4. Inย Advanced โ†’ Request, set:

(Replace Github with the exact name of your authentication scheme)

This triggers GitHub authentication when the button is clicked.

APEX_AUTHENTICATION=github

5. Final Output

Once configured, users can log in to your Oracle APEX application using their GitHub account. After successful authentication, they are redirected to the home page with a valid APEX session.

โœ” Secure OAuth-based authentication
โœ” Improved user experience
โœ” Modern login approach for APEX apps

๐Ÿ Conclusion

Integrating GitHub Sign-In with Oracle APEX is a powerful way to modernize authentication while maintaining enterprise-grade security. With minimal configuration and no custom OAuth code, APEX enables seamless integration with GitHubโ€™s identity platform.

This setup is ideal for applications targeting developers, internal teams, and technical users.

If you like this article Please share with your friends and family members to appreciate or work and help others.

Happy APEXING ๐Ÿš€

Love coding? Me too! Letโ€™s keep in touch โ€“ subscribe to my website for regular chats on Oracle APEX, PL/SQL,SQL JavaScript, and CSS.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

    Your email address will not be published. Required fields are marked *