问题:
How can I define a route in my routes.jsx file to capture the __firebase_request_key
parameter value from a URL generated by Twitter's single sign on process after the redirect from their servers?如何在我的 routes.jsx 文件中定义路由以从 Twitter 的单点登录过程生成的 URL 中捕获__firebase_request_key
参数值?
http://localhost:8000/#/signin?_k=v9ifuf&__firebase_request_key=blablabla
I tried with the following routes configuration, but the :redirectParam
is not catching the mentioned param:我尝试使用以下路由配置,但:redirectParam
没有捕获提到的参数:
<Router>
<Route path="/" component={Main}>
<Route path="signin" component={SignIn}>
<Route path=":redirectParam" component={TwitterSsoButton} />
</Route>
</Route>
</Router>
解决方案:
参考一: https://stackoom.com/question/2OKpq参考二: React - How to get parameter value from query string?