Forum Cross Platform with Xamarin

OAuth2Authenticator usage when AuthorizationEndpoint URI contains a question mark

Hello,

My authorization server endpoint URI is:
http://www.example.com/index.php?page_id=authorize

OAuth2Authenticator generates this URI:

http://www.example.com/index.php?page_id=authorize?client_id=appdev&redirect_uri=http://fake&response_type=code&scope=profile&state=oxhwuzzjjbhbnjpo

The generated URI is invalid.

Please note, two question marks in the URI, the client_id should've been prefixed with ampersand (&) instead.

Is there any way, I can direct OAuth2Authenticator to generate a valid URI when my Authorization endpoint URI already has one parameter?

Thank you,
Alex.

Best Answer

  • avcalcavcalc US ✭✭
    Accepted Answer

    I've solved the issue by extending the OAuth2Authenticator class, overriding the OnCreatingInitialUrl() method with "query.Add("page_id", "authorize");"

Answers

  • avcalcavcalc USUniversity ✭✭
    Accepted Answer

    I've solved the issue by extending the OAuth2Authenticator class, overriding the OnCreatingInitialUrl() method with "query.Add("page_id", "authorize");"

Sign In or Register to comment.