Repository navigation
Configuring Gitea with Tinyauth [SOLVED] #1221
|
Managed so far to make Tinyauth work for Immich and Vaultwarden, but with Gitea I got stuck at "The provided redirect URI is not trusted" by Tinyauth. Any help appreciated :-( per Gitea specific instructions:When registering a new OAuth2 authentication, the callback/redirect URL should be: https://gitea.mysite.com/user/oauth2/TinyAuth/callback For the purposes of this post https://auth.mysite.com is where my Tinyauth is hosted and respectively https://gitea.mysite.com where Gitea is, all features work perfectly, can log in with user & password. Tinyauth .env settings:Also tried adding these, didn't change the result of the error:
Tinyauth runs as a docker (podman) container via quadlet configuration, behind a reverse proxy (OpenLiteSpeed) connected via Tinyauth's own self-generated socket. As mentioned, other apps (Immich, Vaultwarden) work flawlessly with Tinyauth logging in, so it must not be the proxy settings. OLS forwards all headers to Tinyauth and all certificates are up to date and reachable. Gitea Admin Settings -> Identity & Access -> Authentication Sources:Tinyauth service Log entries:For the life of me, I can't find the actual redirect/callback URI Gitea is sending (and Tinyauth rejects)
|
Replies: 3 comments 1 reply
|
The error Here is how to find the exact rejected URI, why it happens with Gitea, and how to fix it: 1. How to find the exact URI Gitea is sendingYou can see the exact URI immediately without checking server logs:
Alternatively, enable debug logging in Tinyauth: TINYAUTH_LOG_LEVEL=debugTinyauth will then log both the incoming 2. Common Causes in GiteaCause A: Gitea
|
|
I am still curious towards which other apps people here managed to configure Tinyauth as an OAuth / OIDC sign-in option, besides the above listed 3 I so far found. |
|
Here are several popular self-hosted applications that support standard OpenID Connect (OIDC) and integrate seamlessly with Tinyauth, along with their expected callback URI patterns: 1. GrafanaGrafana has native Generic OAuth support that works directly with Tinyauth discovery:
2. NextcloudNextcloud supports OIDC via the official
3. Portainer (CE / EE)Portainer supports custom OAuth/OIDC under Settings -> Authentication:
4. BookStackBookStack has built-in native OIDC configured purely via environment variables:
5. Mealie (Recipe & Meal Planner)Mealie features native OIDC discovery support:
6. Paperless-ngxPaperless-ngx integrates with OIDC via
7. Uptime KumaUptime Kuma supports OpenID Connect authentication natively in modern releases:
8. JellyfinWith the official
Pro-Tip for Adding New Clients in TinyauthWhen adding any of these services to your Tinyauth TINYAUTH_OIDC_CLIENTS_<APP>_NAME="AppName"
TINYAUTH_OIDC_CLIENTS_<APP>_CLIENTID="app-client-id"
TINYAUTH_OIDC_CLIENTS_<APP>_CLIENTSECRET="app-client-secret"
TINYAUTH_OIDC_CLIENTS_<APP>_TRUSTEDREDIRECTURIS="https://app.mysite.com/callback-path"Because Tinyauth strictly checks redirect URIs, always inspect the first authorization handshake in your browser Network tab to confirm whether the application appends trailing slashes or path parameters. |

The error
"Redirect URI not trusted"means the exact string Gitea passes in theredirect_uriquery parameter during the/authorizehandshake does not match any entry inTINYAUTH_OIDC_CLIENTS_GITEA_TRUSTEDREDIRECTURIS.Here is how to find the exact rejected URI, why it happens with Gitea, and how to fix it:
1. How to find the exact URI Gitea is sending
You can see the exact URI immediately without checking server logs:
/authorizeendpoint:https://auth.mysite.com/authorize…