using hybridauth behind a load balancer

244 views Asked by At

I have a few running servers, behind a load balancer

I'm using hybridauth to authenticate users throw google and facebook

By reviewing the hybridauth code it seems that it uses the session to store data while it pinging back and forward with the given provider.

When i'm behind a load balancer i'm expose to a scenario: that the machine that started the authentication process is not the machine that will end the authentication process and the session data will vary.. so the authentication will fail

what can i do ?

Thanks

2

There are 2 answers

4
Necrogami On

You could easily store sessions in redis or memcache with laravel and that would solve your problem.

0
Joshua Webb On

For anyone having an issue like this either with hybridauth or any other thing that stores session Data replication is the answer. I fixed similar issues setting up replicated network storage with GlusterFS.