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

POW with MongoDB #724

Open
shahryarjb opened this issue Feb 12, 2024 · 2 comments
Open

POW with MongoDB #724

shahryarjb opened this issue Feb 12, 2024 · 2 comments

Comments

@shahryarjb
Copy link

shahryarjb commented Feb 12, 2024

Hello, I want to migrate to POW library because I have an auth provider that supports the JWT with auth2 protocol, however updating this part of my software will be quite difficult. I have few inquiries.

Since my database is mongodb, how can I personalize every POW feature for this kind of database? where should I begin with this?

My provider library has three different methods of authentication, and I'm wondering if POW can handle them all.

  • Server side sessions and cookies on user client websites such as nextjs and reactjs;
  • Auth2 (access token and refresh token)
  • a simple session for my LiveView(default phoenix)

I have read this link https://hexdocs.pm/pow/api.html, I think it gives me full access to api for creating tokens and refresh it, without needing Postgres or stored user? am I right?


  1. My big problem is forcing the POW get user data from my mongodb, how can do it (CRUD)?

  2. and my second requirement is how can I be able to create server side cookie on another domain for the known front websites that want to communicate with me?


I appreciate all of your work; maintaining an authentication library is challenging and requires a lot of resources.

Thank you in advance

@shahryarjb
Copy link
Author

@danschultzer can I have your help please?

@Schultzer
Copy link
Contributor

If you search hex, then you will find a Postgres store: https://hex.pm/packages?search=Pow&sort=recent_downloads

That should have everything you’ll need to write your own MongoDB store.

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