Код: Выделить всё
MAX_AGE = 60 * 60 * 24 * 360
COMMON = {
"httponly": True,
"secure": True,
"samesite": "None",
"path": "/",
"domain": ".myweb.net",
"max_age": MAX_AGE,
}
def set_auth_cookies(response, access_token: str, refresh_token: str):
response.set_cookie("refresh_token", refresh_token, **COMMON)
response.set_cookie("access_token", access_token, **COMMON)
return response
< /code>
Я подтвердил, что MAX_AGE устанавливается на длительное время, так что это не сеанс cookie по дизайну. Эта проблема, по -видимому, специфична для экосистемы iOS. {
setLoadedOnce(true);
lastLoadEndAt.current = Date.now();
failCount.current = 0;
if (healthTimer.current) {
clearTimeout(healthTimer.current);
healthTimer.current = null;
}
}}
onContentProcessDidTerminate={() => webRef.current?.reload()}
onRenderProcessGone={() => webRef.current?.reload()}
onShouldStartLoadWithRequest={() => true}
setSupportMultipleWindows={false}
onError={() => setTimeout(() => webRef.current?.reload(), 300)}
renderError={({ description }) => ⚠️ {description}}
onHttpError={(e) =>
console.log("HTTP", e.nativeEvent.statusCode, e.nativeEvent.description)
}
/>
Подробнее здесь: https://stackoverflow.com/questions/797 ... ork-on-chr