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.15.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.15.0 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.14.3 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.14.2 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.14.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.14.0 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.13.2 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.13.0 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.12.6 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.12.5 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.12.4 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.12.3 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.12.2 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.12.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.12.0 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.11.2 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.11.1 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.11.0 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.10.3 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js
katalyst-koi-4.10.2 app/assets/javascripts/koi/controllers/webauthn_authentication_controller.js