Keratin supports generic OAuth2 providers here: https://github.com/keratin/authn-server/blob/master/lib/oauth/provider.go
However, there is no means to read configurations from the environment, or otherwise inject them. The credentials, scopes and endpoints required for an *oauth2.Config could be represented by:
CUSTOM_OAUTH_NAME (Used for HTTP path.)
CUSTOM_OAUTH_CREDENTIALS
CUSTOM_OAUTH_AUTH_URL
CUSTOM_OAUTH_TOKEN_URL
CUSTOM_OAUTH_SCOPES
Or, the env vars could be written to be easily pattern matchable to allow for multiple custom providers.
I see there are outstanding requests for Twitter and other providers. A generic provider would sidestep the need to PR for every requested provider. I believe the oauth2 library took the same tack and basically stopped accepting changes for what amounted to config as code: https://github.com/golang/oauth2#policy-for-new-packages
Keratin supports generic OAuth2 providers here: https://github.com/keratin/authn-server/blob/master/lib/oauth/provider.go
However, there is no means to read configurations from the environment, or otherwise inject them. The credentials, scopes and endpoints required for an
*oauth2.Configcould be represented by:CUSTOM_OAUTH_NAME(Used for HTTP path.)CUSTOM_OAUTH_CREDENTIALSCUSTOM_OAUTH_AUTH_URLCUSTOM_OAUTH_TOKEN_URLCUSTOM_OAUTH_SCOPESOr, the env vars could be written to be easily pattern matchable to allow for multiple custom providers.
I see there are outstanding requests for Twitter and other providers. A generic provider would sidestep the need to PR for every requested provider. I believe the
oauth2library took the same tack and basically stopped accepting changes for what amounted to config as code: https://github.com/golang/oauth2#policy-for-new-packages