MM-18179 Clear cache and cookies for SSO login (#3220)
* MM-18179 Clear cache and cookies for SSO login * Update app/components/failed_network_action/index.js Co-Authored-By: Miguel Alatzar <migbot@users.noreply.github.com>
This commit is contained in:
parent
b37811d8e1
commit
90f6fd6cb8
3 changed files with 3 additions and 12 deletions
|
|
@ -174,16 +174,7 @@ RCT_EXPORT_METHOD(
|
|||
WKHTTPCookieStore *cookieStore = [[WKWebsiteDataStore defaultDataStore] httpCookieStore];
|
||||
[cookieStore getAllCookies:^(NSArray<NSHTTPCookie *> *allCookies) {
|
||||
for(NSHTTPCookie *currentCookie in allCookies) {
|
||||
// Uses the NSHTTPCookie directly has no effect, nor deleted the cookie nor thrown an error.
|
||||
// Create a new cookie with the given values and delete this one do the work.
|
||||
NSMutableDictionary<NSHTTPCookiePropertyKey, id> *cookieData = [NSMutableDictionary dictionary];
|
||||
[cookieData setValue:currentCookie.name forKey:NSHTTPCookieName];
|
||||
[cookieData setValue:currentCookie.value forKey:NSHTTPCookieValue];
|
||||
[cookieData setValue:currentCookie.domain forKey:NSHTTPCookieDomain];
|
||||
[cookieData setValue:currentCookie.path forKey:NSHTTPCookiePath];
|
||||
|
||||
NSHTTPCookie *newCookie = [NSHTTPCookie cookieWithProperties:cookieData];
|
||||
[cookieStore deleteCookie:newCookie completionHandler:^{}];
|
||||
[cookieStore deleteCookie:currentCookie completionHandler:^{}];
|
||||
}
|
||||
resolve(nil);
|
||||
}];
|
||||
|
|
|
|||
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "mattermost-mobile",
|
||||
"version": "1.22.1",
|
||||
"version": "1.23.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -147,4 +147,4 @@
|
|||
"node_modules/(?!react-native|jail-monkey)"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue