code: private void handleAccessTokenResponse(@NonNull Uri uri) {
          final String fragment = uri.getFragment();
          if (TextUtils.isEmpty(fragment)) {
              onError(AuthenticationError.INVALID_RESPONSE);
              return;
          }
  
          final Uri fragmentUri = new Uri.Builder().encodedQuery(fragment).build();
  
          // In case fragment contains error, we want to handle that too.
          final String error = fragmentUri.getQueryParameter(ERROR);
          if (!TextUtils.isEmpty(error)) {
              onError(AuthenticationError.fromString(error));
          } else {
              onTokenReceived(fragmentUri);
          }
      }
docs: Process the callback for AccessToken.
  
  @param uri Redirect URI containing AccessToken values.