https://supertokens.com/ logo
#support-questions
Title
# support-questions
r

rp

08/13/2021, 10:25 AM
- before connecting to the graphql subscription server, the frontend can query some endpoint in your express app which uses normal session verification. - in that endpoint, if a session exists, you return the
sessionHandle
of the session to the client. Else some error - If the client gets the session handle, it passes that to the request to the
onConnect
function. - In the
onConnect
function, if the req doesn't have a
sessionHandle
, then
return false
(which will cause a disconnection). Else query the supertokens core to check if the
sessionHandle
exists. If it doesn't
return false
, else return the context object to establish the connection.