# Custom oauth configs not created from env vars

**URL:** <https://forums.rocket.chat/t/custom-oauth-configs-not-created-from-env-vars/562>\
**Category:** Community Support\
**Created:** [April 11, 2018, 8:29am UTC](https://forums.rocket.chat/t/custom-oauth-configs-not-created-from-env-vars/562 "2018-04-11T08:29:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saplla](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@saplla](https://forums.rocket.chat/u/saplla)\
**Post date:** [April 11, 2018, 8:29am UTC](https://forums.rocket.chat/t/custom-oauth-configs-not-created-from-env-vars/562/1 "2018-04-11T08:29:02Z")

</div>

I’m installing rocket chat via helm. I’ve specified a load of settings as environment variables to configure keycloak as an oauth provider, e.g.:

Accounts\_OAuth\_Custom-Keycloak: true  
Accounts\_OAuth\_Custom-Keycloak-url: [https://example.com/](https://example.com/)

When I log into rocketchat, no custom oauth config exists. However, as soon as I create one called ‘Keycloak’, then I find it’s been populated with all the values I set. At that point I also have logging in with keycloak as an option on the log in screen.

It seems rocket chat is picking up the env vars, but is just missing the logic to automatically create the custom auth provider during installation.

How can I programmatically create the custom oauth entry, or is this just a bug? Thanks.

---

<div class="post-metadata">

**Author:** ![boris](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/boris/32/1110_2.png) [@boris](https://forums.rocket.chat/u/boris)\
**Post date:** [September 29, 2024, 5:01pm UTC](https://forums.rocket.chat/t/custom-oauth-configs-not-created-from-env-vars/562/2 "2024-09-29T17:01:05Z")

</div>

I have the same issue with my custom oauth provider, all works if you create from UI but if I try to set it up using environment variables on a fresh install it says unknown oauth provider, is it possible these days?
