I tried to create .NET Core 2 app which uses only REST API. To consume this API I want to use Vanila JS or Jquery.
I want on UI get JWT token from Auth0.com. I think that I should be transferred to Auth0.com site and log in there. Then go back to my site with JWT token. After that, I want to call my API with the token to Authorize this call. Can you suggest me how I can do it? Some links or anything like that?
The other idea is to call REST API. UI I’ll sent as params login and password. Then the method will call Auth0. Auth0 will return to app JWT token. The app will return JWT token to UI. UI will save token and every time when I’ll call any API method I’ll use that JWT token.
If those approaches are wrong, please tell me what is a proper way of doing that stuff?
I want to also say that I want to be able to test that solution with Postman :).