No description
Find a file
2025-02-11 15:54:55 +01:00
.github/workflows INt 2025-01-02 14:07:20 +01:00
src Close httpclient with finally 2025-02-11 15:54:55 +01:00
tests Fix github actions 2025-01-03 09:59:49 +01:00
.gitignore stupid nimble 2025-01-02 15:11:26 +01:00
LICENSE Initial commit 2025-01-02 14:01:28 +01:00
README.md INt 2025-01-02 14:07:20 +01:00
yubikey_otp.nimble Close httpclient with finally 2025-02-11 15:54:55 +01:00

yubikey_otp

For general information see:

This is a simple api call and validator for the yubikey's OTP.

1. Set up

Go to https://upgrade.yubico.com/getapikey/ and get an API key. Save the clientID.

2. Register user on

  let
    clientID = <clientID from step 1>
    otp = <users otp from yubikey>

  let
    data = yubikeyRegister(clientID, otp)

  if data.success:
    # Save the `data.publicID` to the database and associate it with the user
  else:
    # Handle the error

3. Validate on login

  let
    clientID = <clientID from step 1>
    publicID = <users publicID from registration>
    otp = <users otp from yubikey>

  if yubikeyValidate(clientID, publicID, otp):
    # Success
  else:
    # Failure