Skip to content

Commit

Permalink
Handle missing auth token on login.
Browse files Browse the repository at this point in the history
  • Loading branch information
aforge committed Jun 5, 2023
1 parent 202e349 commit f8cb428
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions TinodeSDK/Tinode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,9 @@ public class Tinode {

// auth expires
if ctrl.code < ServerMessage.kStatusMultipleChoices {
guard authToken != nil else {
throw TinodeError.invalidState("Server did not return auth token")
}
isConnectionAuthenticated = true
store?.myUid = newUid
setAutoLoginWithToken(token: authToken!)
Expand Down

0 comments on commit f8cb428

Please # to comment.