Skip to content

[FEATURE] Pass JWT in Authorization header #963

Description

@Sleuth56

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

I have applications that do their own auth based on JWT that I would like to use tinyauth to get the JWT from the IDP and send to the backend application.

Describe the solution you'd like.

A optional config flag that when enabled passes the JWT from the IDP inside the Authorization HTTP header along to the backend application.

Like what oauth2-proxy does.

Describe alternatives you've considered.

No response

Additional context

No response

Human Written Confirmation

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

Activity

  1. bsaurusrex commented on Oct 9, 2026

    @bsaurusrex

    For context, a few related threads:

    From the current code (main @ 8d99068): the OAuth token is only held in the pending-login cache (GetOAuthToken in internal/service/auth_service.go) and isn't kept after login. The stored Session has no token field. So this would need:

    1. Token storage in the session (sqlite + postgres migration).
    2. Refresh handling, because IdP tokens usually expire long before a tinyauth session does.
    3. A choice of which token to send. Google's access token is opaque and only its id_token is a JWT, while GitHub provides no id_token at all.
    4. A precedence rule with the existing per-app Basic Auth Authorization header in setHeaders.

    Would a scoped, opt-in version (per app, OIDC providers only, id_token only) be something you'd consider, or is this out of scope like #858?

    Disclosure: the code references above were gathered with AI assistance and checked by me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions