Skip to content

Commit

Permalink
Clear session when reason INVALID
Browse files Browse the repository at this point in the history
To stay consistent with other SDKs.
  • Loading branch information
louischan-oursky committed Jul 17, 2024
1 parent ade0bf0 commit 635cfe0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/oursky/authgear/Authgear.kt
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ constructor(
SettingsAction.DELETE_ACCOUNT,
options
)
core.clearSessionState()
core.clearSession(SessionStateChangeReason.INVALID)
handler.post {
listener?.onFinished()
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/oursky/authgear/AuthgearCore.kt
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ internal class AuthgearCore(
}
}

private fun clearSession(changeReason: SessionStateChangeReason) {
internal fun clearSession(changeReason: SessionStateChangeReason) {
tokenStorage.deleteRefreshToken(name)
storage.deleteApp2AppDeviceKeyId(name)
synchronized(this) {
Expand Down

0 comments on commit 635cfe0

Please sign in to comment.