@block-auth.io/angular 0.8.0 → 0.9.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.
@@ -172,10 +172,7 @@ class BlockAuthRuntimeDirective {
172
172
  onError: () => this.errored.emit(),
173
173
  onLogout: () => this.loggedOut.emit(),
174
174
  });
175
- this.client.registerRuntime({
176
- switchAccount: this.runtime.switchAccount,
177
- resumeSession: this.runtime.resumeSession,
178
- });
175
+ this.client.registerRuntime({ switchAccount: this.runtime.switchAccount });
179
176
  void this.runtime.start();
180
177
  }
181
178
  ngOnDestroy() {
@@ -10154,16 +10151,11 @@ class FlowBlockAuthComponent {
10154
10151
  effect((onCleanup) => {
10155
10152
  if (!this.isReconnectingRemembered() || !this.ui().isServiceConnected)
10156
10153
  return;
10157
- let cancelled = false;
10158
- const timer = setTimeout(async () => {
10159
- await untracked(() => this.resumeOrRequestSignin(() => cancelled));
10160
- if (!cancelled)
10161
- this.isReconnectingRemembered.set(false);
10154
+ const timer = setTimeout(() => {
10155
+ this.isReconnectingRemembered.set(false);
10156
+ untracked(() => this.requestReturningSignin());
10162
10157
  }, REMEMBERED_SIGNIN_SETTLE_MS);
10163
- onCleanup(() => {
10164
- cancelled = true;
10165
- clearTimeout(timer);
10166
- });
10158
+ onCleanup(() => clearTimeout(timer));
10167
10159
  });
10168
10160
  effect(() => {
10169
10161
  if (!this.ui().isSigning)
@@ -10241,19 +10233,8 @@ class FlowBlockAuthComponent {
10241
10233
  if (this.isRequestingSignin() || this.ui().isSigning)
10242
10234
  return;
10243
10235
  this.isRequestingSignin.set(true);
10244
- void this.resumeOrRequestSignin();
10245
- }
10246
- }
10247
- async resumeOrRequestSignin(isCancelled = () => false) {
10248
- const resumed = await this.client.resumeSession();
10249
- if (isCancelled())
10250
- return;
10251
- if (resumed) {
10252
- this.isRequestingSignin.set(false);
10253
- setIsSigningLoader(false);
10254
- return;
10236
+ this.requestReturningSignin();
10255
10237
  }
10256
- this.requestReturningSignin();
10257
10238
  }
10258
10239
  requestReturningSignin() {
10259
10240
  // LOG-IN branch: emit the signin transaction, then open the signin modal