'Asp.Net Core - modify authentication schemes while server is running

Is there a way to modify/add/remove authentication schemes while the server is running?

I need to add scheme without restarting my server.



Solution 1:[1]

If you want change the code which is running in your server, it's impossible to modify authentication schemes.

Unless you use Azure webapp, you can create a slot to hot start your application.

Suggestion:

You need change your code, and rebuild your project, and you must retsart your webapp. You can think about how to add authentication schemes dynamically.

AuthSamples.DynamicSchemes

This repo should be useful to you. For more details, you can refer below post.

Adding new authentication schemes dynamically

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jason