Nice! I'm wondering: if your app was an SPA working with the session data from the API, but since it's no more, is it possible to return a JWT token from the GraphQL API instead and store that in the remix session and send it back on subsequent requests?
Yes. In your loader, you need to return the Set-Cookie header with the JWT token response though to the browser. Then every fetch from your browser will include that JWT token in the cookie header.
Nice! I'm wondering: if your app was an SPA working with the session data from the API, but since it's no more, is it possible to return a JWT token from the GraphQL API instead and store that in the remix session and send it back on subsequent requests?
Yes. In your
loader
, you need to return theSet-Cookie
header with the JWT token response though to the browser. Then every fetch from your browser will include that JWT token in the cookie header.Hey Thank you! I actually did exactly that.