Due to the way that ruby's URI module works, I think that this line:
https://github.com/nov/rack-oauth2/blob/master/lib/rack/oauth2/util.rb#L37 might be behaving somewhat too naively.
If my return uri is on an Ember App, for instance, the url contains a hash before the end of the path, e.g. "localhost:8000/#/callback/"
everything after the first "#" is considered part of the url's "fragment."
Because of this, I get redirected to something like:
The code param gets passed in front of the "#" instead of at the end of the url. Because Ember requires the "#" to perform any routing, and my app is looking for a terminating "?key=value" query string, the form which the URL is directed to somewhat breaks the whole auth flow for me. Would it make sense to add a check for any forward-slashes following the hash, to make this line more supportive of apps that use this type of routing?
Any thoughts?