mirror of
https://github.com/miniflux/v2.git
synced 2025-08-16 18:01:37 +00:00
Add generic OpenID Connect provider (OAuth2)
This adds the oauth2 provider `oidc`. It needs an additional argument, the OIDC discovery endpoint to figure out where the auth and token URLs are. Configuration is similar to setting up the Google Authentication with these changes: * `OAUTH2_PROVIDER = oidc` * `OAUTH2_OIDC_DISCOVERY_ENDPOINT = https://auth.exampe.org/discovery`
This commit is contained in:
parent
54602b55bb
commit
3e1e0b604f
88 changed files with 15856 additions and 155 deletions
|
@ -23,6 +23,10 @@
|
|||
<div class="oauth2">
|
||||
<a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "page.login.google_signin" }}</a>
|
||||
</div>
|
||||
{{ else if hasOAuth2Provider "oidc" }}
|
||||
<div class="oauth2">
|
||||
<a href="{{ route "oauth2Redirect" "provider" "oidc" }}">{{ t "page.login.oidc_signin" }}</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
<footer id="prompt-home-screen">
|
||||
|
|
|
@ -64,6 +64,14 @@
|
|||
<a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "page.settings.link_google_account" }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ else if hasOAuth2Provider "oidc" }}
|
||||
<div class="panel">
|
||||
{{ if hasKey .user.Extra "oidc_id" }}
|
||||
<a href="{{ route "oauth2Unlink" "provider" "oidc" }}">{{ t "page.settings.unlink_oidc_account" }}</a>
|
||||
{{ else }}
|
||||
<a href="{{ route "oauth2Redirect" "provider" "oidc" }}">{{ t "page.settings.link_oidc_account" }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue