question

Kiran avatar image
Kiran asked ·

Not getting callback when requesting AuthorizationCode

I am trying to get authorization code in my android app using the following code:

AuthorizationManager.authorize(new AuthorizeRequest.Builder(requestContext)
  .addScope(ProfileScope.userId())
  .forGrantType(AuthorizeRequest.GrantType.AUTHORIZATION_CODE)
  .build());

But I am not getting callback to the listener add to my requestContext.

I get callback when the grant type id ACCESS_TOKEN.

Is there anything wrong with the call I am using ?

login with amazonandroid
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

liangda avatar image
liangda answered ·

For AuthorizeRequest.GrantType.AUTHORIZATION_CODE, you have to call LWA AuthorizeRequest .Builder#withProofKeyParameters() to specify the challenge code and challenge code method. This is required in OAuth 2.0 protocol https://tools.ietf.org/html/rfc7636 .


Please see this doc for details about challenge code and challenge code method. https://tools.ietf.org/html/rfc7636#page-8

1 comment
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.