Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions waosSwift/lib/helpers/CookiePlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ struct CookieStorager {
guard let cookie = httpReq.allHeaderFields["Set-Cookie"] as? String else {
return false
}
do {
try keychain.set(cookie, key: "Cookie")
return true
} catch let error {
print(error)
return false
if(cookie.contains("TOKEN")) {
do {
try keychain.set(cookie, key: "Cookie")
} catch let error {
print(error)
return false
}
}
return false
}
}

Expand Down