hyperstack-react 0.6.4 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +3 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -6976,7 +6976,9 @@ class ConnectionManager {
|
|
|
6976
6976
|
if (this.authConfig?.tokenEndpoint) {
|
|
6977
6977
|
return this.authConfig.tokenEndpoint;
|
|
6978
6978
|
}
|
|
6979
|
-
|
|
6979
|
+
// Always use the default hosted token endpoint for hosted URLs,
|
|
6980
|
+
// even without a publishableKey - some endpoints don't require auth
|
|
6981
|
+
if (this.hostedHyperstackUrl) {
|
|
6980
6982
|
return DEFAULT_HOSTED_TOKEN_ENDPOINT;
|
|
6981
6983
|
}
|
|
6982
6984
|
return undefined;
|
|
@@ -7020,9 +7022,6 @@ class ConnectionManager {
|
|
|
7020
7022
|
return this.currentToken;
|
|
7021
7023
|
}
|
|
7022
7024
|
const strategy = this.getAuthStrategy();
|
|
7023
|
-
if (strategy.kind === 'none' && this.hostedHyperstackUrl) {
|
|
7024
|
-
throw new HyperStackError('Hosted Hyperstack websocket connections require auth.publishableKey, auth.getToken, auth.tokenEndpoint, or auth.token', 'AUTH_REQUIRED');
|
|
7025
|
-
}
|
|
7026
7025
|
switch (strategy.kind) {
|
|
7027
7026
|
case 'static-token':
|
|
7028
7027
|
return this.updateTokenState(strategy.token);
|