Graphql-engine: Feature request: method to forcefully disconnect a websocket

Created on 30 Dec 2019  路  2Comments  路  Source: hasura/graphql-engine

In current version of hasura, when the user token (whatever you pass to the auth hook) is revoked (e.g. user logged out remotely or user credential changed), any websocket already connected to hasura will still work and their access will not be revoked. I'd like to request a method to disconnect one or all the websockets from a certain user ID, so when the user automatically reconnect, their token will be re-verified by the auth hook.

server

Most helpful comment

Currently we enforce the expiry of authorization information in JWT mode (the connection gets closed after the expiration time as specified in the JWT). This is lacking in the webhook mode, maybe the webhook can specify the expiry time of the session with Expires header?

I'd like to request a method to disconnect one or all the websockets from a certain user ID, so when the user automatically reconnect, their token will be re-verified by the auth hook.

This I feel should be added as a part of a larger 'subscription management' APIs for an admin user.

All 2 comments

Currently we enforce the expiry of authorization information in JWT mode (the connection gets closed after the expiration time as specified in the JWT). This is lacking in the webhook mode, maybe the webhook can specify the expiry time of the session with Expires header?

I'd like to request a method to disconnect one or all the websockets from a certain user ID, so when the user automatically reconnect, their token will be re-verified by the auth hook.

This I feel should be added as a part of a larger 'subscription management' APIs for an admin user.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leoalves picture leoalves  路  3Comments

Fortidude picture Fortidude  路  3Comments

tirumaraiselvan picture tirumaraiselvan  路  3Comments

shahidhk picture shahidhk  路  3Comments

lishine picture lishine  路  3Comments