Skip to content

Use :before_send callback with plugs for sessions #398

New issue

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

Merged
merged 1 commit into from
Jan 30, 2020
Merged

Conversation

danschultzer
Copy link
Member

@danschultzer danschultzer commented Jan 30, 2020

In #356 (comment) I discussed how the store might be updated before a response gets aborted. I haven't dug too much into how it all works, but I think this is the proper path after looking at how Plug.Session handles writes in the :before_send callback with Plug.Conn.register_before_send/2.

This PR makes soPowPersistentSession.Plug.Cookie and Pow.Plug.Session also uses :before_send callback for writes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant