Login with Facebook on multiple servers

Asked 2 years ago, Updated 2 years ago, 44 views

Currently, I have two servers on AWS for load balancing, but I can't implement Facebook login well.

When I try to log in,

Facebook SDK returned an error: Cross-site request trigger validation failed. Required param "state" missing.

The above error will appear.

It worked well when I had one server, but

Please let me know if you know more.Thank you for your cooperation.

php aws

2022-09-30 18:15

1 Answers

When redirecting to the login page with OAuth, I think the state is put in the cookie and managed, but I think it will happen if the server you saved and the server you read are different.
You may need to share session information across multiple servers or allow the load balancer to distribute the same session to the same server.


2022-09-30 18:15

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.