How To Handle "Not existing user token" Error ?

so i’m trying to check if an email is already registered and for that i’m doing this :
let whereClause = “email = ‘(email)’”
let dataQuery = BackendlessDataQuery()
dataQuery.whereClause = whereClause
let dataStore = self.backendless?.persistenceService.of(BackendlessUser.ofClass())
dataStore?.find(dataQuery , response: { (result :BackendlessCollection?) -> Void in

let results = result?.getCurrentPage()


if results?.count == 0 {// user is not registered

} else { // user is already registered


}) { (fault :Fault?) -> Void in

print(“checkUserAvailability: (fault?.message)”)
// to sign up
here user is not logged in, and it’s an expected behaviour but since user is not logged in i’m getting “Not existing user token” error. how can i bypass it?
how about if we clear existing user token? and can we do that?

Do you use in your program “stayLoggedIn” functionality? It can store UserToken locally. And if you make some changes for that user - his token can become invalid.
Try as a workaround “logout” function, it should clear UserToken too.

Maybe this doc would be helpful
Please, write to us about your progress.