Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have an example of JWT Auth using Bcrypt as Node.js functions in my starter kit, you can extrapolate from there:

https://github.com/GavinRay97/hasura-ultimate-starter/tree/m...

The sign-up Action bcrypt hashes the password and saves it by sending a mutation to Hasura, and the login Action queries for the user by their email and tries to bcrypt compare their password against the stored one and then return a spec-compliant token if they match.

It's fairly simple to implement your own Auth in Hasura, you just need to return a signed JWT that matches the spec:

https://hasura.io/docs/1.0/graphql/manual/auth/authenticatio...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: