Hi Piyush,
This is intended behavior, see the OpenID Connect specification
here:
You could try adding the following query parameter to the request:
https://authserver.com/mga/sps/oauth/oauth20/authorize?
...
response_mode=query
But I haven't tested whether that works. (it can have two values:
query and
fragment).
Kind regards,
------------------------------
Dries Eestermans
IS4U
------------------------------
Original Message:
Sent: Thu April 23, 2020 04:37 PM
From: Piyush Agrawal
Subject: OAuth2.0 authorize equest respone location with #
Thank you for Reply Jon.
Bad example actually I am getting response as
https://www.testportal.no/app/mobile-demo/oauth/oauth2Client.jsp#state=3zWrQCYvPJDBcVsc56IW&code=jjUbDvBwGysnCjDbYrFhevlj0hK5hH&id_token=eyJraWQiOiJo....
# is present in Implicit and hibrid flow but not in Authorization Code Flow.
Here is an example of Auth Request with response_type= code id_token
https://authserver.com/mga/sps/oauth/oauth20/authorize?
client_id=testclient
&scope=openid
&response_type=code%20id_token
&state=3zWrQCYvPJDBcVsc56IW
&code_challenge=94bbea8e27c8b382b6bef307xfdfsdfadfdsfsd
&code_challenge_method=sha256&nonce=blah
&redirect_uri=https://www.testportal.no/app/mobile-demo/oauth/oauth2Client.jsp
Regards,
Piyush
------------------------------
Piyush Agrawal
Original Message:
Sent: Thu April 23, 2020 08:17 AM
From: Jon Harry
Subject: OAuth2.0 authorize equest respone location with #
Hello Piyush,
If you are getting back #<access token> from your request to /authorize then you have triggered an Implicit flow and not an Authorization Code flow. To trigger an Authorization Code flow, make sure that your request includes response_type=code.
Jon.
------------------------------
Jon Harry
Consulting IT Security Specialist
IBM
Original Message:
Sent: Thu April 23, 2020 06:24 AM
From: Piyush Agrawal
Subject: OAuth2.0 authorize equest respone location with #
Hello,
Very basic question but when we are trying oauth with code flow then response from /mga/sps/oauth/oauth20/authorize
on redirect_uri=https://www.testportal.no/app/mobile-demo/oauth/oauth2Client.jsp
Response header location looks like
https://www.testportal.no/app/mobile-demo/oauth/oauth2Client.jsp#access_token
is it possible to change "#" and replace it with "?"
------------------------------
Piyush Agrawal
------------------------------