Comments (4)
Could you please provide steps to reproduce? Tests that break would be even better. Thanks.
from plug_rails_cookie_session_store.
I'm not sure exactly what @sanjiv-hartleylab is seeing however I was having issues with Rails 4.2.7 loading a session created by this plug. I solved it by calling put_session(conn, "session_id", Base.encode16(:crypto.strong_rand_bytes(16), case: :lower))
to add a session id. It appears that without a session id Rails doesn't think a session exist when it tries to load it.
from plug_rails_cookie_session_store.
@paulnicholson where did you add the put_session
call in your app?
from plug_rails_cookie_session_store.
@fbjork Well, my motivation for getting this to work was rails <-> elixir form posting with csrf validation. I wrote a plug to handle csrf protection in a rails compatible way and that plug ensures the session has a session id. See gatherdigital/plug_rails_csrf_protection@ff12afd/lib/plug_rails_csrf_protection.ex#L202
from plug_rails_cookie_session_store.
Related Issues (11)
- nil can't be coerced into Fixnum HOT 3
- Cannot write session HOT 2
- Cowboy 2 compatibility HOT 1
- Issues with Rails 5.2.2 HOT 3
- LiveView Configuration Issue - LiveView session was misconfigured or the user token is outdated HOT 1
- Elixir can read Marshal Format HOT 18
- Generation phoenix cookies like rails
- In Rails 7.1 the cookie format has changed compared to 7.0. Breaks Phx->Rails, but not Rails->Phx transition. HOT 1
- mix test fail HOT 1
- Having trouble sharing session between rails 3 and phoenix HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plug_rails_cookie_session_store.