minder
minder copied to clipboard
Refactor token generation to make it testable
Some ideas in this thread https://github.com/stacklok/minder/pull/2413#discussion_r1502784683
In summary, store a map of map[provider]*auth.OAuthConfig which is managed via a Register(string, *auth.OAuthConfig). On calls to NewOAuthConfig look up the auth.OAuthConfig from the map.