Encapsulate Auth0 auth logic in ASP.NET

Issue that I have is that below code gets repeated in several places when instantiating auth0 and
I’m looking to refactor codes so that they don’t repeat (ideally somehwhere in startup.cs)

saw quick examples in official auth0 doc but they’re either for .net core or owin.

I’d like to see your suggestion. thanks

Screen Shot 2022-11-25 at 1.56.05 PM

Hey there!

Unfortunately I’m not a .NET expert so I won’t be able to help here. I’m just gonna add some tags to your questions for better searchability but in general it’s all up to your architecture so it might be difficult for somebody to share advice with you if they don’t have any details about your implementation. Thank you!