capacitor-community / generic-oauth2

Generic Capacitor OAuth 2 client plugin. Stop the war in Ukraine!
MIT License
223 stars 106 forks source link

Bug: Last query parameter includes URL fragment #182

Closed jvartanian closed 1 year ago

jvartanian commented 2 years ago

Library version:

OAuth Provider:

Affected Platform(s):

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:

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.