Skip to content

Authentication & Identity

This project implements the required entities and endpoints to handle authentication and authorization with credentials.

Authentication is handled via JWT token.

I built my own entities and endpoints. It is highly based on Microsoft’s implementation in the Identity package.
No one likes to work with the Identity package and it offers very little for the added complexity when using simple credential based auth. Entities are stored in your database via ef core, so you are completely in control of your user data.

There are fully written endpoints to handle log in, registration, password reset, impersonation and more.

Features

  • Login
  • Register
  • Create an account for another user without password
  • Forgot password / Reset password
  • Impersonate a user
  • Update a user
  • Use JWT token for authentication

Final Thoughts

  • Short docs page, because I have written a lot more explanation and ToDo’s for you in the actual code base than usual.
  • Auth is the part of any app that I find vary the most when using this template. Users, roles, tenants and access concepts are just very different across apps.
    This is a good starting point, but you will have to touch these endpoints.
  • Based mainly on Microsoft implementation.
  • Definitely check out FastEndpoints documentation for cookies, jwt refresh or other useful features.