-
How do I use the auth token from the client side of ssr and how to make sure that it's added to the server side. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
There's some details on this here, if you have a larger auth need: https://formidable.com/open-source/urql/docs/advanced/authentication/
It goes after SSR since it's an asynchronous exchange, i.e. it may do auth calls, while the If you need to cater for SSR then you need to find a different way to get your API credentials for |
Beta Was this translation helpful? Give feedback.
There's some details on this here, if you have a larger auth need: https://formidable.com/open-source/urql/docs/advanced/authentication/
It goes after SSR since it's an asynchronous exchange, i.e. it may do auth calls, while the
ssrExchange
andcacheExchange
are synchronous, i.e. caching, exchanges, so you'll have something like1. dedup, 2. ssr, 3. cache, 4. auth, 5. fetch
If you need to cater for SSR then you need to find a different way to get your API credentials for
getAuth
. This will very much depend on your authentication method and how you've set up your app.