vercel / next.js

The React Framework
https://nextjs.org
MIT License
121.28k stars 25.95k forks source link

Fixes with-supertokens example #65267

Closed rishabhpoddar closed 2 weeks ago

rishabhpoddar commented 2 weeks ago

This PR fixes how a protected API is called once the user is logged in, in the with-supertokens example app.

samcx commented 2 weeks ago

@rishabhpoddar Can you further clarify on this in the description (e.g., is it because it's redundant?)?

rishabhpoddar commented 2 weeks ago

Oh yea, sorry. It is redundant indeed, cause we add interceptors to XHR / fetch which add the access token to the request automatically + manage their refreshing based on the response from the the API.