Title
d

danny

09/16/2017, 10:44 AM
#newbie problem: I’m thinking on how to build users authentication in graph.cool. My understanding is that in terms of authentication: my app user === graph.cool user (that’s a bit opposite to the ‘default’ practice in RDBM where app has ‘db user’). Is that correct? aaand if that above is correct then how to build (tutorial?) a system like e.g. blog engine/cms/e-shop where app has its own users with all login-remind-my-password etc features - any advice will be priceless!!
a

agartha

09/16/2017, 10:47 AM
Yes, that's correct. A JWT token is generated for the app user, and that is used to authenticate against the Graphcool API endpoints.
d

danny

09/16/2017, 10:48 AM
thnx!! so do I have any tools to manage those users in graphcool console of somekind (?)
a

agartha

09/16/2017, 10:49 AM
There is a built-in type User, that you can also see in the Graphcool console. If you use any of the built-in integrations, that's where your users 'live'
d

danny

09/16/2017, 10:49 AM
OK. I got it!. Do you have any advice on my second part q?
a

agartha

09/16/2017, 11:01 AM
The built-in authentication doesn't offer the features you are looking for (reset password etc.). For that, you need to roll your own authentication mechanism using Schema Extensions. That's still a beta feature though, if you want to use it you need to contact @nilan. After that, you can find numerous authentication examples here: https://github.com/graphcool-examples/functions/tree/master/authentication
The easiest to start with though, is probably the built-in email/password authentication, you can enable that on the 'Integrations' tab in the Console.
d

danny

09/16/2017, 11:02 AM
Thanks a lot man! I owe you! 👍
😎 1
I’ll start with that!
a

agartha

09/16/2017, 11:03 AM
There's a basic tutorial here (react/apollo + email/pwd auth): https://www.graph.cool/docs/tutorials/react-apollo-email-oopheesaj9/
d

danny

09/16/2017, 11:05 AM
I’ve found that last one, but my problem was reduced to one paragraph - ‘In console open integration tab and click email enabled’ that made me puzzled a bit. Now I guess I have answers (or at least the direction)
a

agartha

09/16/2017, 11:08 AM
d

danny

09/16/2017, 11:19 AM
btw: do you have any experience with auth0 (in production?)
a

agartha

09/16/2017, 11:22 AM
Yes, works great too, I use a custom implementation though, based on the Schema Extensions example I linked
d

danny

09/16/2017, 11:24 AM
mhm, I would of course love to escape all that fuss with email verifcation/twitter/google auth/reminders etc 🙂
a

agartha

09/16/2017, 11:24 AM
Then you should use that
d

danny

09/16/2017, 11:25 AM
that == auth0 ? 🙂
a

agartha

09/16/2017, 11:25 AM
Yes
d

danny

09/16/2017, 11:26 AM
I’m watching now the intro video
(btw looks awesome)
For the record: here is pretty complete tutorial addressing my problem: https://www.graph.cool/docs/tutorials/react-apollo-auth0-pheiph4ooj/ (tnx @agartha for inspiration)