Hello,
I am using Auth0 in a NodeJS based backend application where in an API endpoint, I have the following check:
if (!req.oidc.user) {
res.status(401).json({ message: "User is not logged in." });
return;
}
In the React frontend, I need to make an authenticated request to that API endpoint. I need the appSession
token for that to pass as a cookie in my Axios request from frontend.
It is supposed to be onClick event for POST’ing data in a particular user’s profile, but for that I need the token in the frontend.
Help would be appreciated.