MauiBlazorTemplate icon indicating copy to clipboard operation
MauiBlazorTemplate copied to clipboard

✨ Add Identity Management with JWT tokens

Open VR-Architect opened this issue 1 year ago • 0 comments

I added Microsoft Identity to my API with a controller to handle user login which sends back a token to the UI frontends. The same controller also handles logout, registration, and get user claims methods.

On the front ends is tricky to find secure ways to save the JWT token and prevent JWT forgeries, so I am still working on that. Yah, Identity Server 4 now Duende is an option, but I never figured out how to get the usernames to appear in the API controllers. I kept getting the client identity instead. So gave up. Also tried Auth0 and MS Azure with same issues. The API has to know the identity of the actual user calling the API and not the client some how. So I rolled my own.

VR-Architect avatar Aug 27 '22 00:08 VR-Architect