I have a react web app and a .net core api hosted in Azure.
I have added Easy Auth to both of them following this documentation.
Once I login to my FE app I need to get an access token which I get by making a request to GET /.auth/me
in order to consume my BE app.
I'm using React Toolkit RTK Query.
I'm fairly new to react so have two questions:
- How can I make the
GET /.auth/me
request on any page after login in. Tried calling it on App.js but got an error. - How can I make the BE calls wait for the
GET /.auth/me
request to fulfill so that I can include the access token on the BE calls.