-
Hello, I am trying to override this yaml struct with environment variables.
I made this function to bind each AUTH_PROVIDERS_{NAME}_{KEY} env variable to the corresponding dict in the yaml struct.
This is my environment:
However, the result is not what I expected. Sometimes it works and all the variables are set properly, sometimes only the client_id, sometimes only the client_secret, sometimes none of them, etc... How can I achieve that ? Thank you ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
To be honest, I'm not entirely sure what you are trying to achieve: are you trying to be able to configure multiple providers at the same time? If so, can one provider of the same type be instantiated multiple times? One thing I see right off the bat is that |
Beta Was this translation helpful? Give feedback.
-
Using a map and setting the providers empty by default solved the issue. yaml config
Go structs
Env
Code
|
Beta Was this translation helpful? Give feedback.
Using a map and setting the providers empty by default solved the issue.
yaml config
Go structs
Env