We are Trying to Implement the solid server api in the angular , when i am trying to Triger the api i am getting the 401 unauthorization for that i am passing the access
Code would be helpful, but are you making sure to establish the session with the Identity Provider first and prompting the user to log in? That should return an access token and a basic auth token that you attach to further requests to provide your identity. Since you’re using Angular, there should be a way to view the fields in the server response object.
I am starting with the Login api when i am sending the payload to the api it showing the cors error for post method and i implement the profile api with fixing the cors (‘Sec-Fetch-Mode’: ‘cors’) for the get method once the cors error was resolved i will try to fetch the access tocken from the response then i will try.
Help me how to resolve the cors isssue.
/login endpoint you are fetching looks like it is an authorization endpoint exposed by an OpenID Provider. This type of endpoint is unsuitable for
fetch interaction, the user whole window should be redirected there. That’s why you are getting these CORS errors, and these are intentional, as they explicitly prevent from misusing the endpoint.
@inrupt/solid-client-authn-browser is an example of library to interact with this endpoint.