Modeling Multiple OAuth Providers with a Shared Interface
I'm developing an OAuth client to try to get a feel on Effect.
I've defined an OAuthProvider tag which defines an interface that should be shared by provider implementations (has some functions like
Now the thing I'm not entirely sure how to model is how to define multiple providers which:
1. should all implement the same
2. they can all be "provided" separately so I can get the correct one dynamically in a
I've defined an OAuthProvider tag which defines an interface that should be shared by provider implementations (has some functions like
createAuthorizationURL, validateAuthorizationCode, etc.)Now the thing I'm not entirely sure how to model is how to define multiple providers which:
1. should all implement the same
OAuthProvider interface2. they can all be "provided" separately so I can get the correct one dynamically in a
/oauth/:provider/callback