Liking cljdoc? Tell your friends :D


A Clojure library for implementing sever-side TOTP multi-factor authentication.


(require '[totp-clj.core :as totp])

;; generate a new TOTP secret
(def secret (totp/generate-secret))

;; verify a user-provided token against an existing secret
(totp/verify secret "123456")

;; generate a QRCode PNG image for the user to scan
(totp/qrcode (totp/uri "my-app" "codahale" secret))


Copyright © 2016 Coda Hale

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close