Skip to content

Configure oauth2_client from env #31995

Open
@3isenHeiM

Description

@3isenHeiM

Description

I'm provisioning an OAuth2 (authentik) client using env variables in the docker compose file.

Here is the complete env variables I'm passing to the container :

 - GITEA__ENABLE_AUTO_REGISTRATION=true
 - GITEA__SECURITY__INSTALL_LOCK=true
- GITEA__openid__ENABLE_OPENID_SIGNIN=false
- GITEA__openid__ENABLE_OPENID_SIGNUP=false
- GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION=true
- GITEA__oauth2_client__ENABLE=true
- GITEA__oauth2_client__ENABLE_AUTO_REGISTRATION=true
- GITEA__oauth2_client__REGISTER_EMAIL_CONFIRM=false
- GITEA__oauth2_client__PROVIDER_NAME=Authentik
- GITEA__oauth2_client__CLIENT_ID=<REDACTED>
- GITEA__oauth2_client__CLIENT_SECRET=<REDACTED>
- GITEA__oauth2_client__ISSUER_URL=https://auth.tld/application/o/gitea
- GITEA__oauth2_client__AUTO_DISCOVER_URL=https://auth.tld/application/o/gitea/.well-known/openid-configuration
- GITEA__oauth2_client__USE_ADMIN_GROUP=true
- GITEA__oauth2_client__OPENID_CONNECT_SCOPES=profile,email
- GITEA__oauth2_client__ACCOUNT_LINKING=auto
- GITEA__oauth2_client__USERNAME=preferred_username

These variable correclty populates the app.ini.

However I don't see the "Sign it with Oauth" button on the homepage.

What do I miss in my configuration ?

Thanks

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

No response

How are you running Gitea?

docker-compose

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/workaroundit is or has a workaroundtype/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions