Cannot redirect to Discourse. Error: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource

I am trying to understand what is not working.

When you uncheck ‘Automatically create and login users’ and then log out of both Discourse and WordPress, can you log into Discourse by clicking the Discourse login button? What should happen is that you are taken through the WordPress login process and are then redirected to Discourse as a logged in user.

When you uncheck ‘Automatically create and login users’ and then logout of Discourse, but do not log out of WordPress, can you login to Discourse by clicking the Discourse login button? What should happen is that you are automatically logged into Discourse without having to enter a password. The authentication is being taken care of by WordPress.

What do you mean by ‘with ajax call’?