Skip to content

Commit 2654731

Browse files
committed
calls login if the auth handler is not implemented.
1 parent ad171b9 commit 2654731

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

iterableapi/src/main/java/com/iterable/iterableapi/IterableApi.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,17 @@ 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()) {
224228
if ((authToken != null && !authToken.equalsIgnoreCase(_authToken)) || (_authToken != null && !_authToken.equalsIgnoreCase(authToken))) {
225229
_authToken = authToken;
226230
storeAuthData();
227231
onLogIn();
232+
} else if (bypassAuth) {
233+
onLogIn();
228234
}
229235
}
230236
}

iterableapi/src/main/java/com/iterable/iterableapi/IterableAuthManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)