OAuth Providers - Runtime

Hi Demis,

We need to allow our customers to setup their social accounts in runtime using our app control panel.

But the current OAuth2 Provider implementation loads the key, secrets, etc in the constructor:

Any suggestion on how to update these settings in runtime (without restarting the app)?

Whilst configuration is only meant to be set in AppHost.Configure() and remain immutable thereafter you should still be able to access the AuthProvider at runtime and update it’s properties with something like:

var authProvider = (GoogleOAuth2Provider)AuthenticateService.GetAuthProvider(GoogleOAuth2Provider.Name);
authProvider.ConsumerKey = "...";