Getting back from oAuth / parsing URL
I'm quite sure there's a recipe but can't quickly figure it out so maybe someone can help me.
Whole app is covered by the OIDC authentication, Router included; so that untill user is authenticated, the router is not initialized. For the authentication, we send user to the oAuth page, with redirect URL (base) and actual URL user requested in the state.
What I want to do is to put that state into the storage shortly until Router is ready, and when it's ready, to handle the URL by TanStack router.
The caveat is that URL is not parsed and I can't send
What I'm doing is to use history somehow as a thin layer that will be updated so that router will handle that as an "external" update and will parse URL on it's own – it clearly can do that if I remember correctly and probably does that on the initial load. The trouble is that I can't get it to handle history yet, but maybe this "parsing" API is exposed and I'm missing something?
TLDR: need to turn
Whole app is covered by the OIDC authentication, Router included; so that untill user is authenticated, the router is not initialized. For the authentication, we send user to the oAuth page, with redirect URL (base) and actual URL user requested in the state.
What I want to do is to put that state into the storage shortly until Router is ready, and when it's ready, to handle the URL by TanStack router.
The caveat is that URL is not parsed and I can't send
routeId to the router, I have full path. Using that in navigate would lead to Invariant failed, as the href is not an actual route.What I'm doing is to use history somehow as a thin layer that will be updated so that router will handle that as an "external" update and will parse URL on it's own – it clearly can do that if I remember correctly and probably does that on the initial load. The trouble is that I can't get it to handle history yet, but maybe this "parsing" API is exposed and I'm missing something?
TLDR: need to turn
URL into ToOptions