/index.php/login/v2
does not add CORS headers. We need that to create the login link for you to get redirected to the login page of your Nextcloud instance.
.php
resources are equipped with CORS headers: location ~ \.php(?:$|/) {
.
add_header 'Access-Control-Allow-Origin' $valid_origin always;
where valid_origin
includes id.sopher.io
and a few others but this is the one relevant to you.