Supabase Authentication is a custom Drupal 10 module that integrates Supabase with Drupal for user authentication.
- Allows administrators to configure Project URL and API Key.
- Automatically creates a user in Supabase when a new Drupal user is created.
- Authenticates the user with Supabase and retrieves the access token.
- Drupal 10
- Supabase account
rafaelwendel/phpsupabase
PHP libraryemail_registration
Drupal module
-
Clone the module:
cd /path/to/drupal/web/modules/custom git clone https://github.com/md61421/supabase_authentication.git cd supabase_authentication
-
Install the required PHP library:
composer require rafaelwendel/phpsupabase
-
Install the
email_registration
module:composer require 'drupal/email_registration'
-
Enable the
email_registration
module:drush en email_registration
-
Enable the Supabase Authentication module:
drush en supabase_authentication
-
Log in to your Supabase account:
- Go to Supabase and log in to your account.
-
Select your project:
- Navigate to the project you want to use.
-
Find the API settings:
- Go to the
Project Settings
tab in your Supabase project dashboard. - Select
API
from the sidebar menu. - The
Project URL
andAPI Key (service_role)
will be listed under theConfig
section.
- Go to the
-
Enter the configuration in Drupal:
- Go to
Admin > Configuration > System > Supabase Authentication Settings
in your Drupal site. - Enter the
Project URL
andAPI Key
from your Supabase project. - Save the configuration.
- Go to
Once configured, the module will:
- Automatically create a user in Supabase when a new Drupal user is created.
- Log any errors or success messages in the Drupal logs.
Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.
This project is open source and available under the MIT License.