Roaming Authenticator Everywhere

嘘のPasskey対応を真のPasskey対応にします

Stan na 01-09-2025. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        Roaming Authenticator Everywhere
// @namespace   https://rokoucha.net
// @version     0.0.2
// @author      Rokoucha
// @description 嘘のPasskey対応を真のPasskey対応にします
// @license     MIT
// @match       https://account.edit.yahoo.co.jp/authdevice*
// @match       https://accounts.nintendo.com/passkey/register
// @match       https://accounts.pixiv.net/passkeys/*
// @match       https://id.moneyforward.com/*
// @match       https://my.konami.net/*/security/passkey/registration/*
// @match       https://my.konami.net/*/signin
// @match       https://jp.mercari.com/mypage/personal_info/passkeys
// @run-at      document-start
// ==/UserScript==

function hook() {
    const origCreate = navigator.credentials.create
    navigator.credentials.create = function (options) {
        console.log('create hooked')
        if (options) {
            delete options.publicKey.authenticatorSelection.authenticatorAttachment
        }
        return origCreate.apply(this, [options])
    }

    const origGet = navigator.credentials.get
    navigator.credentials.get = function (options) {
        console.log('get hooked')
        if (options && options.publicKey && options.publicKey.allowCredentials) {
            options.publicKey.allowCredentials = options.publicKey.allowCredentials.map((c) => {
                c.transports = ['ble', 'hybrid', 'internal', 'nfc', 'usb']
                return c
            })
        }
        return origGet.apply(this, [options])
    }
}

console.info("place a hook")
hook()