File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
iterableapi/src/main/java/com/iterable/iterableapi Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -220,12 +220,18 @@ void setNotificationData(IterableNotificationData data) {
220220 }
221221
222222 void setAuthToken (String authToken ) {
223+ setAuthToken (authToken , false );
224+ }
225+
226+ void setAuthToken (String authToken , boolean bypassAuth ) {
223227 if (isInitialized ()) {
224- if (_authToken != authToken ) {
228+ if (( authToken != null && ! authToken . equalsIgnoreCase ( _authToken )) || ( _authToken != null && ! _authToken . equalsIgnoreCase ( authToken )) ) {
225229 _authToken = authToken ;
226230 storeAuthData ();
231+ onLogIn ();
232+ } else if (bypassAuth ) {
233+ onLogIn ();
227234 }
228- onLogIn ();
229235 }
230236 }
231237
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ public void onFailure(Throwable throwable) {
7070 }
7171
7272 } else {
73- IterableApi .getInstance ().setAuthToken (null );
73+ IterableApi .getInstance ().setAuthToken (null , true );
7474 }
7575 }
7676
You can’t perform that action at this time.
0 commit comments