Changing authentication providers at runtime
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
Hi,
I want to support (re)configuring authentication providers at runtime. There are many authentication types supported in the application: cookie authentication, a custom AuthenticationHandler and external providers (such as Google).
Is it possible to enable/disable and reconfigure authentication providers at runtime, even for external providers provided out of the box, such as Google? Additionally, it is possible to use the same external provider multiple times, but with different configurations?
I saw the example for dynamic schemes (https://github.com/aspnet/AspNetCore/blob/5a6b6c90b6e32ecab4975c546228cc63199f168b/src/AuthSamples/samples/DynamicSchemes/Controllers/AuthController.cs), but I was wondering how to do this with external providers that are supported out of the box. Since this is abstracted behind the `AddGoogle` extension on the AuthenticationBuilder, will I need to implement this myself?
I'm using ASP.NET Core 2.2.
Contributor guide
Assessment
This issue has not been assessed yet.