Skip to content

@smooch-ci-android smooch-ci-android released this Apr 26, 2019 · 1 commit to master since this release

What's New?

  • Added new AuthenticationDelegate which gets notified when a request fails because of an invalid JWT, allowing you to renew credentials without having to call Smooch.login(String, String). The delegate is set as a Settings property before initialization.

Sample usage

        Settings settings = new Settings("my_app_id");
        settings.setAuthenticationDelegate(new AuthenticationDelegate() {
            @Override
            public void onInvalidAuth(AuthenticationError error, AuthenticationCallback callback) {
                // retrieve new jwt
                callback.updateToken(newJwt);
            }
        });

        Smooch.init(this, settings, new SmoochCallback() {
            @Override
            public void run(Response response) {
                // Code after init is complete
            }
        });
  • Fixed a crash for some users after logging in without a conversation ID
  • Calling Smooch.login(String userId, String jwt) with same valid credentials already stored will return 200 in the response

API Changes

  1. New interface AuthenticationDelegate
  2. New class AuthenticationError
  3. New interface AuthenticationCallback
Assets 2
You can’t perform that action at this time.