We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
The app login is not working on desktop Safari and iOS devices.
The first query (logIn) is sending the email / password as expected, but is not setting the auth cookie as it should do:
logIn
{ "operationName": "logIn", "variables": { "login": "email@address.com", "password": "password" }, "query": "mutation logIn($login: String!, $password: String!) {\n loginWithCookies(input: {login: $login, password: $password}) {\n status\n __typename\n }\n}\n" }
As a consequence, the second query (getUser) is returning the following response:
getUser
"data": { "viewer": null },
This is because Apple doesn't allow cross-site cookies (related StackOverFlow thread)
The short-term solution is to disable this option from Safari settings:
Safari > Settings > Site tracking > Prevent Cross-Site Tracking.
Safari > Settings > Site tracking > Prevent Cross-Site Tracking
It will allow you to use the app, but it won't fix the issue for all other Safari / iOS users...
The long-term solution is to host both the WordPress (back-end) & the webapp (front-end) on the same domain (e.g. each one on a different sub-domain).
Related to: #1 #2 #3
CC @kellenmace
The text was updated successfully, but these errors were encountered:
@kellenmace I created a PR to add a warning about this in the Readme.
Sorry, something went wrong.
Thanks for the info, Cyril. I have merged in the PR to let other developers know about the shortcoming of this approach in Safari.
No branches or pull requests
Hello,
The app login is not working on desktop Safari and iOS devices.
The issue
The first query (
logIn
) is sending the email / password as expected, but is not setting the auth cookie as it should do:As a consequence, the second query (
getUser
) is returning the following response:The solution
This is because Apple doesn't allow cross-site cookies (related StackOverFlow thread)
The short-term solution is to disable this option from Safari settings:
Safari > Settings > Site tracking > Prevent Cross-Site Tracking
.It will allow you to use the app, but it won't fix the issue for all other Safari / iOS users...
The long-term solution is to host both the WordPress (back-end) & the webapp (front-end) on the same domain (e.g. each one on a different sub-domain).
Related to:
#1
#2
#3
CC @kellenmace
The text was updated successfully, but these errors were encountered: