Creates an HOTP key URI with the algorithm parameter set to SHA1.

Definition

function createTOTPKeyURI(
	issuer: string,
	accountName: string,
	key: Uint8Array,
	periodInSeconds: number,
	digits: number
): string;

Parameters

  • issuer
  • accountName
  • key
  • periodInSeconds
  • digits

Example

import { createTOTPKeyURI } from "@oslojs/otp";

const uri = createTOTPKeyURI("My App", "[email protected]", key, 30, 6);