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 a
Not the react way, but I beleive that this one-line function can help you :)
const getQueryParams = () => window.location.search.replace('?', '').split('&').reduce((r,e) => (r[e.split('=')[0]] = decodeURIComponent(e.split('=')[1]), r), {});
Example:
URL: ...?a=1&b=c&d=test
Code:
> getQueryParams()
< {
a: "1",
b: "c",
d: "test"
}