When the wallet performs authorization through the authorization endpoint the state parameter from RFC6749 are provided. However, there are no checks within the library that ensure the same state value is returned by the authorization server, meaning the responsibility of doing so is left to the caller of the library.
Add a state parameter to the authorizeWithAuthorizationCode method, and check that the newly added state parameter is equal to the state within the request(AuthorizationRequestPrepared) parameter.