XF 2.2 Connected Accounts working on desktop but not mobile?

KensonPlays

Well-known member
For some odd reason, my XF 2.2.12 install works perfectly fine with Connected Accounts on a desktop computer, but if I try on my phone or tablet, they fail and nothing shows on the page except a blank background with the text:

" There is no valid connected account request available. Please try again. "

I try logging in with the same account(s) on both PC and mobile. It happens with all connected accounts set up. "vanilla connections" Google, Twitter, Reddit, Patreon, Discord (from 8wr plugin).
 
Last edited:
Solution
This is something to do with a cookie not existing by the time you come back to the site, so the data stored for the connected account process doesn't exist. I think it's specific to mobile and maybe secure cookies, I don't think they get re-sent or something. I nearly lost my mind to this issue once with Stripe Checkout sessions on mobile.

PHP:
$config['cookie']['secure'] = false;

Try adding that to src/config.php, does that fix it?
This is something to do with a cookie not existing by the time you come back to the site, so the data stored for the connected account process doesn't exist. I think it's specific to mobile and maybe secure cookies, I don't think they get re-sent or something. I nearly lost my mind to this issue once with Stripe Checkout sessions on mobile.

PHP:
$config['cookie']['secure'] = false;

Try adding that to src/config.php, does that fix it?
 
Solution
This is something to do with a cookie not existing by the time you come back to the site, so the data stored for the connected account process doesn't exist. I think it's specific to mobile and maybe secure cookies, I don't think they get re-sent or something. I nearly lost my mind to this issue once with Stripe Checkout sessions on mobile.

PHP:
$config['cookie']['secure'] = false;

Try adding that to src/config.php, does that fix it?
Yep, that fixed it. Thanks!

Thankfully changing to insecure cookies didn't break the SSL functionality of my site.
 
No it shouldn't do, it would normally mean the cookie is only sent for secure requests whereas now it'll be sent for insecure requests too. I can't remember why this is an issue on mobile, would need to research it again.
 
Back
Top Bottom