GordyD / 3ree

An example universal JS application written with the 3REE stack, React + Redux + RethinkDB + Express. A stack for building apps, front and back end, with just Javascript.
MIT License
846 stars 91 forks source link

NOT an Issue - More a Question - Account Integration #39

Open tzarger opened 8 years ago

tzarger commented 8 years ago

Hi @GordyD, this is a create repo and had a question, since you simulate users, have you thought about integrating real user auth as JWT tokens so that a user can come back and see their stuff vs. other people's stuff?

snobear commented 8 years ago

+1 :). In the meantime, check out https://github.com/hoodsy/3ree-auth-example which uses passport-based auth.

tzarger commented 8 years ago

@snobear is it just me, or is https://github.com/hoodsy/3ree-auth-example still rather immature? It seems to have issues with the server side rendering. @GordyD has done such a great job here, I shouldn't be comparing! :-)

snobear commented 8 years ago

@tzarger yes, its still immature and I'm running into a few places in the code that are not built out yet, but its a decent starter reference if you're looking to add auth to this stack.

GordyD commented 8 years ago

Been meaning to comment on this for a while, but I've been going back and forth on whether this would be a suitable addition, apologies for the delay.

On the one hand I see that this would be practical as it would make the demo app more realistic in terms of how you would handle user auth in the real world. Potentially strengthening it as a boilerplate/foundation for 3ree apps.

On the other I see that this adds unnecessary, and opinionated, bloat to the project, where the overriding purpose is to enable people to get to grips with the minimal building blocks of a 3ree app.

Ultimately it comes down to what this repo is trying to be and what I have time for:

I'd be happy with more boilerplate/foundation, but with that comes a great need for maintenance and documentation, and I'd probably need more community support. Would either of you be willing to contribute on some semi consistent level?

snobear commented 8 years ago

What attracted me to this project initially was its simplicity, so I agree you should keep it as is. I've seen a few other awesome stacks out there, but they tend to get super bloated. I'd say build a totally separate 3ree app that illustrates best practices on authentication based on this base 3ree project. Sounds like its time for a 3ree micro framework :).

I would love to contribute to this project, but can't commit at the moment. I'm still learning the various pieces of the stack and how it all works best together and as the usual excuse, too busy at the moment.

tzarger commented 8 years ago

@GordyD @snobear Hello, thank you for your response ... Yes, I understand your point about keeping this repo simple etc. In regards to helping contribute, sure, I would love to perhaps spend some semi-consistent time contributing to perhaps a new repo that takes this current repo and builds upon it.

I should be able to contribute auth using JWT but may need some input on the RethinkDB change feed in order to best work out how perhaps send messages to specific users with change feeds. It might be nice to be able to assign tasks to specific users and only those users would see the tasks show up in "My Events" kind of thing, vs the "Other Events" list of items to make some items private vs unassigned would be "Other Events" for everyone. To me that would be a complete circle of real life use case that has very little coverage in other boilerplates.

Thoughts?

snobear commented 8 years ago

@tzarger since this would be a sizable addition, I'd recommend you starting a separate project from this. I don't think @GordyD or myself would have the time currently to offer the proper advice, research and/or code review.

That said, I'm happy to offer any advice on your project. Just post a link to an issue to discuss in once you get it up and going. I implemented passport in my 3ree project. Its private though so can't share unfortunately :).