Help Center/ Relational Database Service_RDS for PostgreSQL/ Best Practices/ AI Application Development Platform/ Enabling GitHub Third-Party Authentication and Login for RDS Supabase AI Applications
Updated on 2026-10-30 GMT+08:00

Enabling GitHub Third-Party Authentication and Login for RDS Supabase AI Applications

Scenarios

This section describes how to integrate GitHub OAuth 2.0 single sign-on (SSO) into an RDS Supabase instance. By configuring GitHub as a third-party identity provider, you can use your GitHub credentials for secure authentication and login without the need to register a new account. This effectively lowers the access threshold and ensures the reliability of identity authentication. Additionally, this section provides a working demo project that can be used to locally deploy a frontend application and connect it to RDS Supabase. The demo project comprehensively demonstrates the frontend implementation solution, covering authentication process configuration, session management, and user information display. This helps developers quickly understand and reuse the same pattern.

Precautions

RDS Supabase's integration with GitHub SSO depends on the Supabase Auth configuration. For detailed configurations and parameters, see the corresponding sections in RDS Supabase Application to fully understand the service scenarios and configuration process.

The frontend project for this practice is developed using the React + Node.js framework and is deployed locally for simple demonstration. You can also deploy the demo project on an ECS on the cloud and enable public network access.

Prerequisites

  • An RDS Supabase application has been created and is running properly.

    The servers of the third-party identity authentication provider (GitHub) are deployed outside the Chinese mainland. To ensure network reachability and stability and avoid authentication and access timeout caused by high latency, you are advised to purchase an RDS Supabase application in a region outside the Chinese mainland.

  • An EIP has been bound to the RDS Supabase application.
  • The Allow New User Registration function has been enabled.

    Configuration method: On the Supabase application details page, choose Auth Configuration > User Registration Configuration and turn on the switch. For details, see Configuring and Managing User Authentication (Auth).

    If this function is disabled, new user registrations are not allowed. As a result, new GitHub users cannot register or log in.

  • Security group rules have been configured to allow access to the public network. RDS Supabase must be able to communicate with GitHub and the frontend project address.
    • Inbound rules: Allow inbound traffic for IPv4 TCP port 8443. The source address must include the access addresses of GitHub, the current browser, and the client-side frontend application (corresponding to the local demo website in this practice).
    • Outbound rules: Allow outbound traffic for all IPv4 TCP ports. The destination address must include the access addresses of GitHub, the current browser, and the client-side frontend application (corresponding to the local demo website in this practice).
  • The local browser client can access the GitHub official website, and a GitHub account has been registered and an email address has been bound.
  • Node.js has been installed locally. The minimum version required is Node.js 20 LTS.
  • A browser has been installed locally. Internet Explorer is not supported. Chrome or Edge is recommended.

Constraints

  • You have fine-grained permissions for RDS Supabase.
  • In the demo scenario, SSL is disabled and only HTTP is used for access.
  • The local PC or server supports public network access, and port 5173 is not occupied.

Procedure