Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkArgument crashing, if ui_locales has been set manually with earlier versions of AppAuth. #726

Closed
6 tasks done
hnljp opened this issue Aug 3, 2021 · 1 comment
Closed
6 tasks done
Labels

Comments

@hnljp
Copy link
Contributor

hnljp commented Aug 3, 2021

Checklist:

  • I am using the latest release
  • I searched for existing GitHub issues
  • I read the documentation
  • I verified the client configuration matches the information in the identity provider (or I am using dynamic client registration)
  • I am either using a custom URI scheme or https with (App Links)[https://developer.android.com/training/app-links] for client redirect.
  • I can reproduce the issue in the demo app (optional)

Configuration

  • Version: 0.9.1
  • Integration: native Kotlin
  • Identity provider: Both KeyCloak and ID4

Issue Description

Having set "ui_locales" in earlier versions manually...
After updating from 0.8.1 to 0.9.1 the app is crashing, due to the previous ui_locales parameter being saved in AuthState.

Crashing with the following message "Parameter ui_locales is directly supported via the authorization request builder, use the builder method instead".

Stacktrace:

Caused by java.lang.IllegalArgumentException: Parameter ui_locales is directly supported via the authorization request builder, use the builder method instead
       at net.openid.appauth.Preconditions.checkArgument(Preconditions.java:132)
       at net.openid.appauth.AdditionalParamsProcessor.checkAdditionalParams(AdditionalParamsProcessor.java:62)
       at net.openid.appauth.AuthorizationRequest$Builder.setAdditionalParameters(AuthorizationRequest.java:957)
       at net.openid.appauth.AuthorizationRequest.jsonDeserialize(AuthorizationRequest.java:1161)
       at net.openid.appauth.AuthorizationResponse.jsonDeserialize(AuthorizationResponse.java:514)
       at net.openid.appauth.AuthState.jsonDeserialize(AuthState.java:701)
       at net.openid.appauth.AuthState.jsonDeserialize(AuthState.java:726)

Will return to 0.8.1 for now.

@hnljp hnljp added the bug label Aug 3, 2021
@agologan
Copy link
Collaborator

Fixed this by changing how we deserialize the objects in 31f187b
Change is available to test in v0.10.0. Let me know if you run into any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants