Commit 130aa16
committed
Skip push subscription disable on logout when JWT is already expired
When IV is enabled and the JWT has already been invalidated (e.g. by
a prior 401), the UpdateSubscriptionOperation to disable the push
subscription would be permanently blocked by hasValidJwtIfRequired.
Since the backend call would fail with 401 anyway, skip it entirely
and just switch to the new anonymous user.
Made-with: Cursor
Revert "Skip push subscription disable on logout when JWT is already expired"
This reverts commit 5ce284257b6e03b8c862745ff58fcf4293299577.
Exempt UpdateSubscriptionOperation from JWT gating
The subscription update endpoint does not require a JWT on the
backend. Add Operation.requiresJwt (default true) and override it
to false in UpdateSubscriptionOperation so these operations are not
blocked by hasValidJwtIfRequired when the JWT is expired or missing.
This fixes the edge case where logging out with an expired JWT would
permanently block the push subscription disable operation.
Made-with: Cursor1 parent 76dd958 commit 130aa16
File tree
3 files changed
+9
-0
lines changed- OneSignalSDK/onesignal/core/src/main/java/com/onesignal
- core/internal/operations
- impl
- user/internal/operations
3 files changed
+9
-0
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| 441 | + | |
441 | 442 | | |
442 | 443 | | |
443 | 444 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
0 commit comments