You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's an irregular url because it's directed to us from an old system and we can't adjust the path, all the component does is stores the param and redirects elsewhere.
It's fine if we need to parse the url for the params ourselves, but we can't even get that far.
If I set path to path: '/access_token=' then it will load the page, but only that exact url. I tried path: '/access_token=*' and it ignores that splat. Is there any way we can get '/access_token*' to load? Are we doing something wrong?
Expected Behavior
when I set the path to /access_token* I expect it to match like a wild card.
Actual Behavior
It gives me a 404
The text was updated successfully, but these errors were encountered:
Partial dynamic param/splat segments are not supported - at one point partial dynamic segments worked inadvertently but that was fixed in 6.5.0. The param has to be the full URL segment.
You should use a dynamic param or splat route and you can look for access_token=... in the param manually:
letroutes=[{path: '/:param',element: <Param>}];functionParam(){letparams=useParams();if(params.param.startsWith('access_token=')){return<SSOAccessToken/>;// or redirect}// ...}
What version of React Router are you using?
6.26
Steps to Reproduce
We just converted our entire site over to react-router v6 and just realized one route isn't working. We're using createHashRouter.
It's an irregular url because it's directed to us from an old system and we can't adjust the path, all the component does is stores the param and redirects elsewhere.
It's fine if we need to parse the url for the params ourselves, but we can't even get that far.
If I set path to
path: '/access_token='
then it will load the page, but only that exact url. I triedpath: '/access_token=*'
and it ignores that splat. Is there any way we can get '/access_token*' to load? Are we doing something wrong?Expected Behavior
when I set the path to
/access_token*
I expect it to match like a wild card.Actual Behavior
It gives me a 404
The text was updated successfully, but these errors were encountered: