Adding a template
The templates of the dropdown Vorlage come from resources/provider-templates.json of the plugin. The dropdown
lists them sorted by name.
{
"$schema": "./provider-templates.schema.json",
"templates": [
{
"key": "twitch",
"name": "Twitch",
"slug": "twitch",
"issuer": "https://id.twitch.tv/oauth2",
"scopes": "openid user:read:email",
"extra_authorize_params": "{\"claims\":\"{\\\"id_token\\\":{\\\"email\\\":null,\\\"email_verified\\\":null}}\"}",
"button_color": "#9146FF",
"icon": "fa-brands fa-twitch",
"console_url": "https://dev.twitch.tv/console/apps"
}
]
}
Fields
| Field | Required | Meaning |
|---|---|---|
key | yes | Unique ID of the template. Letters, digits, - and _. |
name | yes | Name in the dropdown and of the provider. |
slug | no | Slug of the provider. |
issuer | no | Issuer URL. Use placeholders like <YOUR_DOMAIN> for self-hosted providers. |
scopes | no | Falls back to openid email profile. |
extra_authorize_params | no | A JSON string as above, or a JSON object. |
button_color | no | #RRGGBB. A missing or invalid value falls back to the neutral gray #6B7280. |
icon | no | Font Awesome class name. |
console_url | no | Link to the developer console of the provider, shown after the template is applied. Must start with https://. |
A missing field is emptied when the template is applied. Client ID and client secret are never part of a template.
The JSON Schema resources/provider-templates.schema.json describes all fields. The file links it with $schema, so
editors like VS Code or PhpStorm check the file while you edit it.
Errors
An invalid entry is skipped. If the file is missing, or is not a JSON object with an array templates, the dropdown
is hidden. Both are written to the log of Laravel, and the create page keeps working.
Contributing
Changes to the file are overwritten by an update of the plugin, so please send new templates as a pull request. Make sure that the configuration you suggest is tested!