leuchtfeuer / mautic-auth0-bundle
Auth0 is the solution you need for web, mobile, IoT, and internal applications. Loved by developers and trusted by enterprises.
Fund package maintenance!
www.Leuchtfeuer.com
flossels
Installs: 396
Dependents: 0
Suggesters: 0
Security: 0
Stars: 12
Watchers: 5
Forks: 5
Open Issues: 7
Type:mautic-plugin
Requires
- php: ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.2
- mautic/core-lib: ^5.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.4
- phpstan/phpstan: ^1.0
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpstan/phpstan-strict-rules: ^1.0
- phpunit/phpunit: ^9.5
Replaces
- bitmotion/mautic-auth0-bundle: v2.0.0
This package is auto-updated.
Last update: 2025-03-11 09:53:18 UTC
README
This Mautic plugin allows logins and sign ups via Auth0.
Installation
- Open a Terminal / Console window
- Change directory to the mautic root (i.e.
cd /var/www/mautic
) - Clone this repository into plugins/LeuchtfeuerAuth0Bundle (
git clone https://github.com/Leuchtfeuer/auth0-for-mautic.git plugins/LeuchtfeuerAuth0Bundle
) - Clear the cache (
php bin/console cache:clear
) - Go to Settings -> Plugins and click on "Install/Upgrade Plugins"
- Choose the Auth0 Plugin, adapt the configuration and publish it
There is also the possibility to add this package directly into your project composer.json file by executing following command: composer require leuchtfeuer/mautic-auth0-bundle
.
We are currently supporting following Mautic versions:
Bundle Version | Mautic v5 Support | Mautic v4 Support | Mautic v3 Support | Mautic v2 Support |
---|---|---|---|---|
2.0.x | x | - | - | - |
1.1.x | - | x | x | - |
1.0.x | - | - | x | x |
Plugin Configuration
Configuration | Description |
---|---|
domain | Auth0 Domain |
audience | Link to audience (should be /api/v2) |
client_id | ID of the client |
client_secret | Secret of the client |
Configuration
You can configure the mapping (Auth0 data -> Mautic User data) in the configuration module. There are several options:
Configuration | Title | Default (Auth0) Value |
---|---|---|
auth0_username | Username | |
auth0_email | ||
auth0_firstName | First Name | given_name |
auth0_lastName | Last Name | family_name |
auth0_signature | Signature | |
auth0_position | Position | |
auth0_timezone | Timezone | |
auth0_locale | Language |
Use dot syntax to access arrays (i.e. user_metadata.login_name
).
Roles
If you want to map a role from Auth0 to your Mautic-User you have to alter your app_metadata in your Auth0-User
(where <ROLE_ID>
is the ID of your Mautic-Role):
{
...
"mautic": {
"role": <ROLE_ID>
}
}
Update from Mautic 2.x.x to Mautic 3.x.x
When updating the plugin, please make sure to change the callback URL from ../s/sso_login/Auth0Auth
to ../s/sso_login/Auth0
in your Auth0 application settings.
Update from Mautic 4.x.x to Mautic 5.x.x
When updating the plugin, please make sure to change the callback URL from ../s/sso_login/Auth0
to ../s/sso_login/LeuchtfeuerAuth0
in your Auth0 application settings.
Author
Leuchtfeuer Digital Marketing GmbH