Open coco98 opened 5 years ago
This was also requested by Raj/Pratip
@coco98 The webhook example was added as https://github.com/hasura/graphql-engine/tree/master/community/boilerplates/auth-webhooks/passport-js
Should we add a JWT example also?
@arvi3411301 Can you also add a custom JWT server example?
We already have a boilerplate with passportjs which acts as a webhook.
Hasura supports JWT out of the box. It will be great if we can create a boilerplate which acts as an auth server issuing JWT tokens and also integrates passportjs so that all other login methods like google, facebook, etc. can be integrated later.
To start with, we can implement username-password login, where upon signing up or logging in the auth server issues a JWT token with say user
role and a id
.
Hasura can then be configured with this server's JWK.
Questions? Fire away.
@shahidhk can I take this on? I'll let you know if I have any issues
Go for it! 😁
On Sat 13 Oct, 2018, 15:34 Peter Grainger, notifications@github.com wrote:
@shahidhk https://github.com/shahidhk can I take this on? I'll let you know if I have any issues
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hasura/graphql-engine/issues/451#issuecomment-429527833, or mute the thread https://github.com/notifications/unsubscribe-auth/AD7wPTl763mGZBu2gKAKipbEVU_ezaTsks5ukbrIgaJpZM4Wo_2g .
@peterjgrainger I am looking at starting on a similar task tomorrow, have you managed to make any progress?
@lukebyrne working on it now. I'll post a link to the repo here when I get a chance
@peterjgrainger great stuff, even its not complete today could u post a link later on after your have finished working on it for the day so that I can have a noodle around with it? Cheers
@peterjgrainger Just a heads up, I got a pretty simple Express App working for my needs.
https://gist.github.com/lukebyrne/72129edfb5ae09c844826f7a32b0f322
The process.env.
just go in the .env file and if you read through the code they are all fairly self explanatory.
I have it working with a VueJS frontend.
@shahidhk @lukebyrne took a bit longer than I thought but it's done. Created the boilerplate for the JWT auth server. Hopefully the PR explains what is in there :)
Should cover: