@formant/data-sdk 1.22.0 → 1.23.0

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.
@@ -215,6 +215,16 @@ class AuthenticationStore {
215
215
  isAuthenticated() {
216
216
  return this._token !== void 0;
217
217
  }
218
+ async loginToPeer(t, n) {
219
+ if ((await fetch(`${t}/login`, {
220
+ method: "POST",
221
+ body: JSON.stringify({ password: n }),
222
+ headers: {
223
+ "Content-Type": "application/json"
224
+ }
225
+ })).status !== 200)
226
+ throw new LoginFailureError("Invalid authentication");
227
+ }
218
228
  /**
219
229
  * @deprecated use currentUser property instead.
220
230
  */