Sha256: 48bba658c3375982cac94ffd1e0d669bbd7ee6eba3b4e6e69d829cd31e3d542a

Contents?: true

Size: 550 Bytes

Versions: 65

Compression:

Stored size: 550 Bytes

Contents

import { Controller } from "@hotwired/stimulus";

import {
  get,
  parseRequestOptionsFromJSON,
} from "@github/webauthn-json/browser-ponyfill";

export default class WebauthnAuthenticationController extends Controller {
  static targets = ["response"];
  static values = { options: Object };

  authenticate() {
    get(this.options).then((response) => {
      this.responseTarget.value = JSON.stringify(response);

      this.element.requestSubmit();
    });
  }

  get options() {
    return parseRequestOptionsFromJSON(this.optionsValue);
  }
}

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
katalyst-koi-4.5.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.5.0 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.5.0.beta.2 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.5.0.beta.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.4.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.4.0 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.3.5 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.3.4 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.3.3 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.3.2 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.3.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.3.0 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.3.0.beta.3 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.3.0.beta.2 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.2.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.2.0 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.2.0.beta.2 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.2.0.beta.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.1.2 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.1.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js