Skip to content
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

Manually create session? #72

Closed
kidbombay opened this issue Jan 24, 2019 · 3 comments
Closed

Manually create session? #72

kidbombay opened this issue Jan 24, 2019 · 3 comments

Comments

@kidbombay
Copy link

kidbombay commented Jan 24, 2019

How do we manually create a session given a user?

@danschultzer
Copy link
Collaborator

You can create a plug session with authenticated user by calling Pow.Plug.Session.create(conn, user, otp_app: :my_app):

https://github.com/danschultzer/pow/blob/caa55743fac533cfdbed72b09bb34041adc8697c/lib/pow/plug/session.ex#L66-L94

@kidbombay
Copy link
Author

Great thanks, and closing one out?

@danschultzer
Copy link
Collaborator

danschultzer commented Jan 27, 2019

Just below:

https://github.com/danschultzer/pow/blob/caa55743fac533cfdbed72b09bb34041adc8697c/lib/pow/plug/session.ex#L96-L113

Pow.Plug.Session.delete(conn, otp_app: :my_app)

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

No branches or pull requests

2 participants