I am new to Blazor and web api so please bear with...
I have written a simple REST web api in Blazor and can do the GET side no problem. I can pass in a user id/password to my GET function which I then validate and return some data (if user/pw valid) or an error code.
All the above works fine. I now want to expand my app so that when I first get the user id/password in the above CRUD GET function, I can generate a token (server side) and return it to the calling application so that they can
securely access other functions (as they have logged). I know that web api's are basically stateless but I do not wish to send user id/pw with every data request to the server and validate the user id/pw for each
data request. If I can generate a secure token and associate it with the unique user id this would solve my problem. But how do I store this 'token' somewhere server side other than a database ? I don't want to have to keep
looking up tokens using a database query before I do any additional data query. Basically I think my question is: is there session state for web api in Blazor ? I don't really want to use any Azure/domain authentication as I
already have my own user/pw data base. I hope this makes sense and would appreciate any direction. Regards Rex.