constructor()

in source/client/src/liveness/LivenessDetection.tsx [30:54]


  constructor(props: Props | Readonly<Props>) {
    super(props);
    this.state = {
      challengeMetadata: {
        id: "",
        token: "",
        type: "",
        params: {}
      },
      success: false,
      step: 1,
      errorMessage: "",
      loading: false
    };
    this.onStart = this.onStart.bind(this);
    this.onLocalEnd = this.onLocalEnd.bind(this);
    this.onRestart = this.onRestart.bind(this);
    this.onError = this.onError.bind(this);

    Hub.listen("auth", (data: any): void => {
      if (data.payload.event === "signOut") {
        window.location.reload();
      }
    });
  }