Skip to content
Discussion options

You must be logged in to vote

In approach 1, on the client side, how could I update the access token for all future client/server requests?

According to Rich Harris, it seems like the only way to update the client-side is also to use invalidate and cause load functions to re-run. There is no way to directly update values in $page.data.

Is approach 2 my best bet? Or, are there any alternate approaches I should consider?

I was using cookie-based authentication to fetch access tokens. And, I came to two very important realizations:

  1. Cookie-based authentication between the SvelteKit server and an external server will fail
  2. Consequently, The SSR benefits of SvelteKit completely disappear in this case

Explanations:

  1. In …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dannyvelas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant