Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry on Android #332

Open
Seabird22 opened this issue Mar 14, 2021 · 2 comments
Open

Retry on Android #332

Seabird22 opened this issue Mar 14, 2021 · 2 comments
Labels
feature Request feature

Comments

@Seabird22
Copy link

Feature Request

Retry on Android (after failed authentication)

Feature Description

There doesn't seem to be a retry possibility on Android after a user has unsuccesfully tried to authenticate. In contrast this feature is available in iOS. Is this a bug of a missing feature ? Perhaps it could also have something to do with the way I implemented this plugin. If other people have encountered the same issue, please report.

Thx in advance.

@Seabird22 Seabird22 added the feature Request feature label Mar 14, 2021
@levanax
Copy link

levanax commented Jun 24, 2021

I also encountered the same problem, is there a solution?

@DenWG
Copy link

DenWG commented Apr 13, 2022

I also encountered the same problem, is there a solution?

Recursion to your service, using TS:


export SomeClassName {
private maxErrorsCount = 5;

public faioLogInPrompt$(cnt = 0): Observable<boolean> {
    return from(new Promise((resolve, reject) => {
      (window as any).Fingerprint.show({
          title: 'Confirm it\'s you to unlock the app',
          disableBackup: false,
          fallbackButtonTitle: 'Use PIN'
        },
        (v) => {
          resolve(v);
        },
        (e) => {
          reject(e);
        })
    }))
      .pipe(
        map(result => {
          return result === 'biometric_success' || result === 'Success';
        }),
        catchError((error: { code: number, message: string }) => {
          const counter = cnt + 1;
          console.error('showPromptAndGetResult$ error: ', error);
          if (counter >= this.maxErrorsCount) {
            return of(false);
          }
          return this.faioLogInPrompt$(counter);
        }));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Request feature
Projects
None yet
Development

No branches or pull requests

3 participants