Authentication and Autherization for subscriptions
See original GitHub issueFirst of all thanks for this amazing library. Thanks a lot. The docs for authorization in Apollo docs suck
I have a doubt, is it possible to authorize subscriptions using graphql-shield
? Mutations are also possible, right?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:21
Top Results From Across the Web
Subscriptions and Strong Customer Authentication (SCA)
Subscriptions and stored card information created after the enforcement date will require authentication in compliance with SCA regulation.
Read more >Authentication and authorization - Apollo GraphQL Docs
Control access to your GraphQL API · Authentication is determining whether a given user is logged in, and subsequently determining which user someone...
Read more >User Authorized Requests | Payments Reseller Subscription API
Authorize requests with OAuth 2.0. Following endpoints provided by Payments Reseller Subscription API must be authorized by an authenticated ...
Read more >How to handle authorization in subscriptions? #1297 - GitHub
You have to check authentication on init and store all you need in returned context. Then you can access this data and recheck...
Read more >Authentication and authorization | Mastering ServiceStack
ServiceStack.Auth.CredentialsProvider : You can obtain an authenticated session, by posting a username and a password (either via query string parameters or ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@maticzav can we please keep this open? subscriptions are fundamental to graphql. having this library admit access on subscription level is of paramount importance to quite large audience from apollo/yoga crowds.
isAuthenticate rule is being hit during subscription access evaluation. however no way to whitelist the specific
So evaluation of authorization is not taken under consideration.
I managed to get ride of this issue in graphql-yoga the problem is not in the shield library, but in the way to handle the access token the rule : isAuthenticated in grapql-yoga for example uses the function
it seams that the request property of the context is not accessible from subscriptions to get the user id you have to use another property which is “connection” the Authorization status can be accessible from it, so this code works fine for me
don’t forget to declare it in the interface of the context
hope this will help