fix(signin): Check for all available cookies instead of the count (#504)
This commit is contained in:
parent
e2e7fcf218
commit
3a2e139292
@ -48,9 +48,12 @@ func GetCookie(ctx context.Context, params api.ConfigParams, userPass string) (s
|
||||
}
|
||||
|
||||
cookies := res.Cookies()
|
||||
if len(cookies) != 1 {
|
||||
return "", fmt.Errorf("failure getting session cookie, multiple cookies")
|
||||
|
||||
for _, cookie := range cookies {
|
||||
if strings.Contains(cookie.Name, "influxdb") {
|
||||
return cookie.Value, nil
|
||||
}
|
||||
}
|
||||
|
||||
return cookies[0].Value, nil
|
||||
return "", fmt.Errorf("failure getting session cookie, invalid cookies")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user