After upgrading from django 3 to django 4, the "Sign in with Apple" feature started breaking with the following error
Your request could not be completed because of an error. Please try again later.
The javascript, the frontend html, and the Apple ID url are all identical, and there is no useful error in the console. What is going on?
So it turns out that Django 4 added a new setting called SECURE_CROSS_ORIGIN_OPENER_POLICY which sets the Cross-Origin-Opener-Policy header to
same-origin
.Adding the following line to my django settings module resolved the issue for me
I am not sure why they did this because the default browser value is
unsafe-none
, and the browser error console was not very helpful.