Skip to content

[FEATURE] Generic OAuth Provider templates (discussion) #974

Description

@Rycochet

Is your feature request related to a problem? Please describe.

(For discussion, although if someone wants to make a PR for playing...)

Currently we allow all OAuth providers, but the majority (with the exception of github and google) require you to provide a lot of detail about the provider.

The actual code that supports this is not that large (and also includes some web based images and names), and is mostly a cross-reference of name -> value.

Describe the solution you'd like.

This could possibly be changed to a single template file that contains configuration for the named provider, and potenially a single image file that contains the image for the front-end to use.

This would allow more providers to be added as "defaults", so when tinyauth reads the configuration, if any of the required fields are missing it can check if there is a template file for it and see if that can provide the extra details needed.

The file should also allow for some templating internally so that services such as pocket-id can be semi-automatic:

    environment:
      TINYAUTH_OAUTH_PROVIDERS_POCKETID_CLIENTID: "required"
      TINYAUTH_OAUTH_PROVIDERS_POCKETID_CLIENTSECRET: "required"
      TINYAUTH_OAUTH_PROVIDERS_POCKETID_AUTHURL: "https://pocketid.example.com/authorize"

For this the template could have something like tokenurl: "{{authurl:base}}/api/oidc/token" etc (make AuthURL be the "required" - so if its missing treat it like missing for anything else).

Describe alternatives you've considered.

Keep doing everything manually 😅

Additional context

We don't want to end up with a huge list of every oauth provider out there, but it would be nice if the major ones (FB / MS / etc) could be added easily without needing to change more than a single file.

Human Written Confirmation

  • I confirm this request was written by me and not generated by an LLM or AI assistant.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions