Closed ThePaulMcBride closed 1 year ago
Yep! We just need to figure out what the required db fields are to have and then our simple adapter can handle everything for you.
@flybayer any news on it? i also want to integrate social providers. I would be very happy if you would make the config similar to next-auth 👍 just out of interest... would it theoretically also be possible to use next-auth directly in blitz, or would that involve difficulties?
@niklasgrewe I want to make sure you know we already support social auth with the passport adapter: https://blitzjs.com/docs/passportjs It's slightly more code than next-auth, but you have full control to customize as needed. This particular feature request is just an optimization for simple cases.
And there's no update on this particular issue but this is ready for anyone to work on and figure out how it would look and work.
And theoretically you could use next-auth, but it would take quite a bit for you to hook it up with queries/mutations, etc. Much better to use blitz built in auth.
Does make sense to have it as a recipe to just blitz install passportjs
?
@puria I think we should add that regardless of the request in this issue
What do you want and why?
Right now, it is possible to integrate with lot of 3rd party auth providers using passport strategies. This is super flexible and I don't think Blitz should ever move away from that approach. However, for the majority of cases, I suspect these strategies are identical.
Possible implementation(s)
NextAuth has a good approach for this. You can provide custom setup if you like, but for all of the more common cases, they provide pre-built integrations. In there case it looks something like this.
Would it be possible to do something like this for Blitz?