Closed amirhessampourhossein closed 7 months ago
Generally I go with what you suggested, but over here we need to both register the settings as singleton and use it a few lines later:
Regarding validation, not sure I want to add this to the template, but let me think about it. Keeping the issue open for now
What about separating the second part and putting it in another class that implements IConfigureOptions<JwtBearerOptions>
?
Yeah that's a good option as well. Feel free to create a PR for this if you'd like :)
Thanks Amir! 🫶
Currently, this is how your
JwtSettings
is configured 👇What's your opinion about the approach below 👇
we could also add validation in two different ways :
Fluent Validation