OAuth2 icon indicating copy to clipboard operation
OAuth2 copied to clipboard

Guidance for migration from AuthorizationRoot

Open daltskin opened this issue 7 years ago • 3 comments

Now that the project has been migrated to .NET Standard 2, is there any guidance on how to migrate code that was using AuthorizationRoot?

daltskin avatar Oct 17 '17 09:10 daltskin

I haven't really thought on it too much, but it would be nice to have something based on the new configuration model that Microsoft provides. Would be really nice to have a pr for this. The old configuration model just was a serious PITA to port and would of made this library windows only even through it was .net standard 2.0. If we can make a typed model IAuthSettings or something like that we could inject them in via DI or even new up the new instances and inject those OAuth client instances into our app without leaking settings everywhere.

I've been doing the runtime config (removed the runtime keyword from the config model) . This is how I've been using this library for a really long time https://github.com/exceptionless/Exceptionless/blob/2d4b303250bb7826d6e867c7746d3f0f31e5c5aa/src/Exceptionless.Api/Controllers/AuthController.cs#L269

niemyjski avatar Oct 17 '17 11:10 niemyjski

This is something we'll need to address before 1.0 If you have any feedback or ideas please let us know. I know it's not ideal but this change had to happen at some point as the old configuration is dead and we are not to a 1.0 yet.

niemyjski avatar Oct 17 '17 11:10 niemyjski

The typed model idea sounds good, as long as there is an example of how to implement it. The old MVC sample app really helped understanding.

daltskin avatar Oct 17 '17 14:10 daltskin