fix ios sso cookie bug when running on top-level domain (#2858)
This commit is contained in:
parent
a75c4d0a02
commit
dddfcbc362
1 changed files with 2 additions and 1 deletions
|
|
@ -134,7 +134,8 @@ RCT_EXPORT_METHOD(
|
|||
[cookieStore getAllCookies:^(NSArray<NSHTTPCookie *> *allCookies) {
|
||||
NSMutableDictionary *cookies = [NSMutableDictionary dictionary];
|
||||
for(NSHTTPCookie *currentCookie in allCookies) {
|
||||
if([currentCookie.domain containsString:topLevelDomain]) {
|
||||
NSString *domainWithDot = [NSString stringWithFormat:@".%@", currentCookie.domain];
|
||||
if([currentCookie.domain containsString:topLevelDomain] || [domainWithDot containsString:topLevelDomain]) {
|
||||
[cookies setObject:currentCookie.value forKey:currentCookie.name];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue