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.
104
+
/**
105
+
* Use no authentication at all, and get access only to the data that the Unauthenticated backend role has access to.
106
+
*/
93
107
anonymous?: true;
94
108
95
-
// @deprecated Use internal instead
109
+
/**
110
+
* @deprecated Use internal instead.
111
+
*/
96
112
internalAuthToken?: string;
97
113
98
-
// @private Use an internal platform auth token for authentication
99
-
// This is used to communicate within Gadget itself and shouldn't be used to connect to Gadget from other systems
114
+
/**
115
+
* Use an internal platform auth token for authentication
116
+
* This is used to communicate within Gadget itself and shouldn't be used to connect to Gadget from other systems.
117
+
* @private
118
+
*/
100
119
internal?: {
101
120
authToken: string;
102
121
actAsSession?: boolean;
103
122
getSessionId?: ()=>Promise<string|undefined>;
104
123
};
105
124
106
-
// @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.
125
+
/**
126
+
* Use a passed custom function for managing authentication.
127
+
* For some fancy integrations that the API client supports, like embedded Shopify apps, we use platform native features to authenticate with the Gadget backend.
@@ -470,24 +486,24 @@ export class GadgetConnection {
470
486
// 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.
@@ -498,8 +514,11 @@ export class GadgetConnection {
498
514
connected: (socket,payload)=>{
499
515
// 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