Unable to select query when special characters are present #13002
Unanswered
tommyboylab
asked this question in
Help
Replies: 1 comment
-
This is not a Next.js issue, your Javascript syntax is just incorrect. Trying using this to access the keys:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
While using router.query, I'm unable to select query values which are contained within square brackets
Describe the bug
While receiving a response from an OAuth provider, I receive a query string with an access token, token type and expiry. While the first parameter is named normally (access_token) the others are encapsulated in square brackets ([expires_in]) because of this, I'm unable to select them.
To Reproduce
router.query.access_token = Works
router.query.raw[expires_in] = Does not
Expected behaviour
I should be able to select query parameters which are wrapped in square brackets, same as any other parameters.
If needed, I should be able to supply a string to router.query.
raw[access_token]
as to be able to select such paramsScreenshots
NA
System information
Additional context
If there is a way to do this already, please let me know.
Beta Was this translation helpful? Give feedback.
All reactions