Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-18-2020 04:16 PM
I'm using JWTs for user auth in my app and I have them accessible in the resolvers via the context object, but I'm not quite sure the best way to use them in a granular way. I'd like to check that a user's req.userId matches the authorId that exists in a Comment node in the database before I allow the user's edit to be saved to the db.
I was using @cypher mutations in the typeDefs file to create / edit things like Comments and other nodes, but I don't know how to match something like req.userId in a cypher mutation now that I'm implementing authorization. Now I'm attempting to use session.writeTransaction in custom resolvers but it looks like a pretty convoluted way of doing things so far.
Any suggestions or examples would be very appreciated, thank you
Solved! Go to Solution.
08-18-2020 04:34 PM
I don’t know if you’ve seen this but it’s a very good breakdown of auth in the GRANDstack https://youtu.be/Ay7-RyX9XPM
There will be more to come in that series as well.
08-18-2020 04:34 PM
I don’t know if you’ve seen this but it’s a very good breakdown of auth in the GRANDstack https://youtu.be/Ay7-RyX9XPM
There will be more to come in that series as well.
08-18-2020 06:14 PM
That video did indeed help a lot. Thank you very much for the response.
All the sessions of the conference are now available online