You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use no authentication at all, and get access only to the data that the Unauthenticated backend role has access to.
114
-
*/
96
+
// Use no authentication at all, and get access only to the data that the Unauthenticated backend role has access to.
115
97
anonymous?: true;
116
98
117
-
/**
118
-
* @deprecated Use internal instead.
119
-
*/
99
+
// @deprecated Use internal instead
120
100
internalAuthToken?: string;
121
101
122
-
/**
123
-
* Use an internal platform auth token for authentication
124
-
* This is used to communicate within Gadget itself and shouldn't be used to connect to Gadget from other systems.
125
-
* @private
126
-
*/
102
+
// @private Use an internal platform auth token for authentication
103
+
// This is used to communicate within Gadget itself and shouldn't be used to connect to Gadget from other systems
127
104
internal?: {
128
105
authToken: string;
129
106
actAsSession?: boolean;
130
107
getSessionId?: ()=>Promise<string|undefined>;
131
108
};
132
109
133
-
/**
134
-
* Use a passed custom function for managing authentication.
135
-
* For some fancy integrations that the API client supports, like embedded Shopify apps, we use platform native features to authenticate with the Gadget backend.
136
-
* @private
137
-
*/
110
+
// @private Use a passed custom function for managing authentication. For some fancy integrations that the API client supports, like embedded Shopify apps, we use platform native features to authenticate with the Gadget backend.
@@ -491,24 +471,24 @@ export class GadgetConnection {
491
471
// In the browser, we can't set arbitrary headers on the websocket request, so we don't use the same auth mechanism that we use for normal HTTP requests. Instead we use graphql-ws' connectionParams to send the auth information in the connection setup message to the server.
@@ -519,11 +499,8 @@ export class GadgetConnection {
519
499
connected: (socket,payload)=>{
520
500
// If we're using session token authorization, we don't use request headers to exchange the session token, we use graphql-ws' ConnectionAck payload to persist the token. When the subscription client first starts, the server will send us session token identifying this client, and we persist it to the session token store
0 commit comments