Oslo Has a Free API That Most Developers Dont Know About

typescript dev.to

Oslo provides auth building blocks: password hashing, TOTP, OAuth, JWTs. From the Lucia Auth creator. Password Hashing import { Argon2id } from "oslo/password"; const argon2id = new Argon2id(); const hash = await argon2id.hash("password123"); const valid = await argon2id.verify(hash, "password123"); TOTP (2FA) import { TOTPController, createTOTPKeyURI } from "oslo/otp"; const totp = new TOTPController(); const code = await totp.generate(secret); const valid = a

Read Full Tutorial open_in_new
arrow_back Back to Tutorials