@@ -28,6 +28,14 @@ var rootCmd = &cobra.Command{
2828 parseErr := viper .Unmarshal (& config )
2929 HandleError (parseErr , "Failed to parse config" )
3030
31+ // Secrets
32+ log .Info ().Msg ("Parsing secrets" )
33+
34+ config .Secret = utils .GetSecret (config .Secret , config .SecretFile )
35+ config .GithubClientSecret = utils .GetSecret (config .GithubClientSecret , config .GithubClientSecretFile )
36+ config .GoogleClientSecret = utils .GetSecret (config .GoogleClientSecret , config .GoogleClientSecretFile )
37+ config .GenericClientSecret = utils .GetSecret (config .GenericClientSecret , config .GenericClientSecretFile )
38+
3139 // Validate config
3240 log .Info ().Msg ("Validating config" )
3341 validator := validator .New ()
@@ -46,14 +54,6 @@ var rootCmd = &cobra.Command{
4654 log .Fatal ().Err (usersErr ).Msg ("Failed to parse users" )
4755 }
4856
49- // Secrets
50- log .Info ().Msg ("Parsing secrets" )
51-
52- config .Secret = utils .GetSecret (config .Secret , config .SecretFile )
53- config .GithubClientSecret = utils .GetSecret (config .GithubClientSecret , config .GithubClientSecretFile )
54- config .GoogleClientSecret = utils .GetSecret (config .GoogleClientSecret , config .GoogleClientSecretFile )
55- config .GenericClientSecret = utils .GetSecret (config .GenericClientSecret , config .GenericClientSecretFile )
56-
5757 // Create oauth whitelist
5858 oauthWhitelist := strings .Split (config .OAuthWhitelist , "," )
5959 log .Debug ().Strs ("oauth_whitelist" , oauthWhitelist ).Msg ("Parsed OAuth whitelist" )
0 commit comments