Reputation: 140
I have 2 asp.net core web applications: REST API and React UI. React UI uses default Individual User Accounts
option for authenticating. They are separate solutions.
What I want is to authenticate in API using this default authentication. But I'm don't know how can I do this. So what I want is
Make a call from UI -> Grab user credentials -> Go to API method -> Validate user (e.g. role) -> Return response
As far as I know, default authentication sets AspNetCore.Identity.Application
cookie that used for auth in react. Probably, I can somehow parse it or just use it to authenticate on API side. I thought it's JWT token, but seems like it's not
Upvotes: 1
Views: 1067
Reputation: 1306
React application sends request:
REST API handles /auth request
React app sends request to get items
REST API handles /items request
Upvotes: 1