Hey everyone - I've been on a journey to get this working on my site over the weekend. For anyone having these problems in the future, here's what I've had to do so far:
- Move my flarum site from a separate domain to a subdomain of my wordpress domain because it seems in 2020 there is almost literally no way to share cookies between domains (this is a shame because with the prevalence of the new TLDs, I expect many sites will want to adopt something like "example.community" as their forum address). As an interesting note, stack exchange seems to have figured this out, but it does not appear to have been an easy process and they're not sharing the exact details.
- I had the exact same problem as troymccann (and troymccann ) of getting the error "We could not authenticate with the given credentials. Double-check the URL, username and password." I spoke with SiteGround at some length and they could not figure out why I got a 401 error when trying to use the api token. Finally, while troubleshooting, I installed "miniOrange API Authentication" which gave a more verbose error. In their documentation they recommend the following specific instructions which fixed my problem (I had tried something similar before but I must not have put the code in just the right spot in .htaccess)
This error may occur because of server environment,If Apache server then put the below line in your htaccess file after the RewriteBase.
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
If NGINX server then put the below line in your conf file.
add_header Access-Control-Allow-Headers "Authorization";
Finally, I can connect and get a "Health check good", now though I'm having the error upon user login: {"success":false,"data":[{"code":"http_request_failed","message":"cURL error 60: SSL certificate problem: unable to get local issuer certificate"}]} which was shared by [deleted]
[deleted] says it turned out to be a caching problem but I have cleared by siteground and cloudflare caches and confirmed the two sites are using the same SSL certificate from cloudflare. (According to chrome, at least)
What's my next troubleshooting step?