generic-oauth2 icon indicating copy to clipboard operation
generic-oauth2 copied to clipboard

Bug: Last query parameter includes URL fragment

Open jvartanian opened this issue 4 years ago • 0 comments

Library version:

  • 3.0.1

OAuth Provider:

  • AWS Cognito

Affected Platform(s):

  • Web

Current Behavior

When parsing the URL returned from the OAuth provider, if it contains a query string followed by a fragment, the fragment is included in the last query parameter value. For example, the following URL https://test.com/redirect?response_type=code&state=123456#some_hash_value will be parsed as having the following query parameters:

  • response_type=code
  • state=123456#some_hash_value

Expected Behavior

The URL fragment should not be considered part of the query string, and the last query param value should not include the fragment. The URL fragment is distinct from the query string, and should be treated as such.

jvartanian avatar Nov 02 '21 20:11 jvartanian