You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Im implementing oauth with a url that contains a # and the redirection on the login modal is bad formatted.
my AUTHORIZATION_URL is 'https://<base_url>/#/oauth' and with this url, the login page that open the modal is bad formatted.
The method onShowViewLoginOAuth2 on the oAuth2Callback.on(('url') emit on the socket this url
This url makes a redirect to our login page bad formmated, the url redirectioned is
https://<base_url>/?state=#/oauth?state=&client_id=<client_id>&response_type=code&scope=my_scope&redirect_uri=https%3A%2F%2Fcallback.athom.com%2Foauth2%2Fcallback
Hi,
Im implementing oauth with a url that contains a # and the redirection on the login modal is bad formatted.
my AUTHORIZATION_URL is 'https://<base_url>/#/oauth' and with this url, the login page that open the modal is bad formatted.
The method onShowViewLoginOAuth2 on the oAuth2Callback.on(('url') emit on the socket this url
https://callback.athom.com/oauth2/?token=&url=https%3A%2F%2F<base_url>%2F%23%2Foauth%3Fstate%3D81c3d08b-11b6-4e89-982e-c36c46e04ef0%26client_id%3D<client_id>%26response_type%3Dcode%26scope%3Dmy_scope%26redirect_uri%3Dhttps%253A%252F%252Fcallback.athom.com%252Foauth2%252Fcallback
This url makes a redirect to our login page bad formmated, the url redirectioned is
https://<base_url>/?state=#/oauth?state=&client_id=<client_id>&response_type=code&scope=my_scope&redirect_uri=https%3A%2F%2Fcallback.athom.com%2Foauth2%2Fcallback
and should be like
https://<base_url>/#/oauth?state=&client_id=<client_id>&response_type=code&scope=my_scope&redirect_uri=https%3A%2F%2Fcallback.athom.com%2Foauth2%2Fcallback
I'm implementing OAuth2 with an AUTHORIZATION_URL that contains a hash (#), but the redirection in the login modal is incorrectly formatted.
My AUTHORIZATION_URL is: https://<base_url>/#/oauth
However, when the login modal opens, the emitted URL in the onShowViewLoginOAuth2 method via oAuth2Callback.on('url') is:
https://callback.athom.com/oauth2/?token=<token>&url=https%3A%2F%2F<base_url>%2F%23%2Foauth%3Fstate%3D<state>%26client_id%3D<client_id>%26response_type%3Dcode%26scope%3Dmy_scope%26redirect_uri%3Dhttps%253A%252F%252Fcallback.athom.com%252Foauth2%252Fcallback
This URL results in an incorrectly formatted redirect to our login page:
https://<base_url>/?state=<state>#/oauth?state=<state>&client_id=<client_id>&response_type=code&scope=my_scope&redirect_uri=https%3A%2F%2Fcallback.athom.com%2Foauth2%2Fcallback
Instead, the expected redirect should be:
https://<base_url>/#/oauth?state=<state>&client_id=<client_id>&response_type=code&scope=my_scope&redirect_uri=https%3A%2F%2Fcallback.athom.com%2Foauth2%2Fcallback
Expected Behavior
The redirect should preserve the fragment (#) and not insert additional query parameters before it.
Actual Behavior
The fragment (#) is being interpreted incorrectly, causing query parameters to be misplaced.
Steps to Reproduce
Additional Notes
It seems like the hash fragment (#) is being URL-encoded as %23, which might be causing the incorrect behavior.
Would appreciate any insights or potential fixes. Thanks!
The text was updated successfully, but these errors were encountered: