3 ms·
Which graphql frameworks do handle auth? It’s a genuine question, I don’t know the space but had to rule out graphql in its early days for a seeming lack in thi
by runlaszlorun 3y ago
Which graphql frameworks do handle auth? It’s a genuine question, I don’t know the space but had to rule out graphql in its early days for a seeming lack in this area. But I’ve got a project now where it might be a great fit.
- codethief 3y agoAuthorization is usually not handled by a GraphQL framework. You typically have a business layer between your GraphQL API and your database. (And probably some basic JWT authentication layer in front of your API. Notice the difference between authorization & authentication.)
- runlaszlorun 3y agoSorry, yes, I meant authorization. So you're saying to just effectively run a filter in the business layer based on allowed role/user/whatever. Seems pretty straightforward but I wonder if I'm missing something.
- codethief 3y ago> run a filter in the business layer based on allowed role/user/whatever Yup, this is the way I've seen it implemented everywhere so far.
- amichal 3y agoHasura has authz this (but ive only used it it toy situations) authn is jwt or custom integration https://hasura.io/docs/latest/auth/authorization/permissions/ https://hasura.io/docs/latest/auth/authorization/permissions... Edit: roles via jwt token https://hasura.io/docs/latest/auth/authentication/jwt/ https://hasura.io/docs/latest/auth/authentication/jwt/
- jensneuse 3y agoYou could use WunderGraph in front of your GraphQL and REST APIs to add auth, e.g. using OpenID Connect: https://docs.wundergraph.com/docs/auth/cookie-based-auth/openid-connect https://docs.wundergraph.com/docs/auth/cookie-based-auth/ope...