問題:
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?