A YOURLS plugin that adds login with the Cloudron OpenID Connect provider. It is used by the Cloudron YOURLS package.
- Adds a
Log in with <provider>button to the YOURLS login form. The local login form is collapsed behind aLog in with local accountlink, so users defined inconfig.phpcan still log in with their password. - The YOURLS username is taken from the
preferred_usernameclaim. - Users that logged in once are stored in the
oidc_usersoption. Their auth cookies and API signature tokens keep working without a password entry inconfig.php.
- YOURLS 1.10 or later
- PHP 8.1 or later with the
curlandjsonextensions - Composer
Download yourls-oidc-plugin-<version>.zip from the releases and extract it into user/plugins/. The zip includes the Composer dependencies.
Or from source:
cd user/plugins
git clone https://github.com/cloudron-io/yourls-plugin-oidc.git yourls-oidc-plugin
cd yourls-oidc-plugin
composer install --no-devThen activate the plugin in Manage Plugins.
The plugin reads the environment variables that the Cloudron oidc addon provides:
| Variable | Description |
|---|---|
CLOUDRON_OIDC_ISSUER |
Issuer URL. The plugin is inactive when this is not set |
CLOUDRON_OIDC_CLIENT_ID |
Client ID |
CLOUDRON_OIDC_CLIENT_SECRET |
Client secret |
CLOUDRON_OIDC_PROVIDER_NAME |
Button label. Defaults to Cloudron |
The redirect URI to register with the provider is <YOURLS_SITE>/admin/?oidc=callback.
MIT