openid / AppAuth-JS

JavaScript client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
Apache License 2.0
975 stars 162 forks source link

Support Non-Hash Auth Code Redirects #211

Open chrisguitarguy opened 2 years ago

chrisguitarguy commented 2 years ago

Expected Behavior

I can handled an auth code redirect with a query string, not just a hash.

[REQUIRED] Describe expected behavior

When I call completeAuthorizationRequestIfPossible i'd like it to look at the query string if some configuration option is set.

This line: https://github.com/openid/AppAuth-JS/blob/c30f85e490ab41c9f1e8f8ee05bfdfe964e08626/src/redirect_based_handler.ts#L100 it'd be cool if could handle query strings or hashes.

Describe the problem

See above. My oauth server returns query strings, not hashes. Would like to be able to use this library in browser.

[REQUIRED] Actual Behavior

Second half of the oauth flow never completes, since the code, state, etc, are all in the query string, not hash.

[REQUIRED] Steps to reproduce the behavior

Use an oauth server that sends back an auth code response in a query string.

[REQUIRED] Environment