vapor / auth

👤 Authentication and Authorization framework for Fluent.
53 stars 34 forks source link

web session cookie expired on login #55

Closed robipresotto closed 6 years ago

robipresotto commented 6 years ago

I'm using the latest auth release: 2.0.1

by robitto 2018-09-16 at 22 43 41


it's not easy to reproduce because works fine on my macOS and on my docker image running Linux but doesn't work at AWS ECS FARGATE.

also, my implementation is made following this article https://medium.com/@martinlasek/tutorial-how-to-build-web-auth-with-session-f9f64ba49830 and again, it works fine locally and on my docker image running ubuntu:16.04 and swift:4.1.3

robipresotto commented 6 years ago

@0xTim Helped me to solve that issue. Turned out that to share the session in multiple machines is needed a KeyedCache for the DB. So the fluent will create the relationship on the database and the machines will share the same session.

Just remember to clean up the current session on the database to avoid issues.

Thanks a lot, @0xTim and @vzsg