Closed jasonrdunne closed 4 months ago
Hi @jasonrdunne thanks for opening this issue. There is a known limitation of Webkit based browsers that cookies with secure
flag cannot be operated with a local development server running on the http
protocol.
Please refer to this comment for more information. If you like to develop with Safari, you can utilize next dev --experimental-https
to run the local development server with https
protocol. See Next.js documentation for details.
In addition, looking at your code sample, if you are using Amplify with SSR use cases in your Next.js project, you only need to pass a { ssr: true }
parameter instead of overriding with CookieStorage
by yourself:
function configureAmplify(config: ResourcesConfig): void {
if (!isConfigured) {
Amplify.configure(config, { ssr: true });
const amplifyConfigured = Amplify.getConfig();
console.log("configured", amplifyConfigured, Amplify);
isConfigured = true;
}
}
Please see Amplify documentation https://docs.amplify.aws/gen1/react/build-a-backend/server-side-rendering/nextjs/ for more details.
Ah, I didn't realize it was only local development. In that case it's no problem whatsoever! Thanks
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth, storage, api
Backend
CDK
Environment information
Describe the bug
On successful sign in with safari, I get the following error:
UnexpectedSignInInterruptionException: Unable to get user session following successful sign-in.
My guess is a cookie issue.
Expected behavior
Safari should successfully sign in, as it works on chrome/firefox/edge.
Reproduction steps
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response