checkArgument crashing, if ui_locales has been set manually with earlier versions of AppAuth. · Issue #726 · openid/AppAuth-Android · GitHub
Skip to content

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

Description

@hnljp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions