
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
authenticus
Advanced tools
authenticus is a all-in-one authentication library for Node.js, Deno, Cloudflare Workers, etc.
npm i authenticus
deno.json
{
"imports": {
"authenticus": "https://esm.sh/authenticus@4.1.1"
}
}
Presets:
[!IMPORTANT]
You should wrap your code within a try...catch block, as each of the methods listed below can cause anAuthenticusError
in some rare cases.
import { GitHub } from 'authenticus'
Initialize client.
const github = new GitHub({
clientId: '...',
clientSecret: '...',
scopes: [
'read:user',
'user:email'
] // optional
})
Create a authorization url.
const url = github.createAuthorizeUri({
state: '...',
allowSignup: true
})
Retrieve an access token.
const { accessToken } = await github.getToken({
code: '...',
redirectUri: 'https://example.com/oauth2/callback'
})
Retrieve the user.
const user = await github.getUser(accessToken)
, normalizedUser = github.normalizeUser(user)
authenticus' JWT implementation is based on @timonson's djwt, which is available under the MIT license.
import { jwt } from 'authenticus'
jwt.sign(...)
Please refer to this page for a full guide.
authenticus' OTP implementation is based on @hectorm's otpauth, which is available under the MIT license.
import { otp } from 'authenticus'
// Generate a random secret.
const secret = otp.createRandomSecret()
// Create an URI for a QR code for Google Authenticator.
const uri = otp.createUri(secret, 'Issuer', 'Label')
// Get the current OTP.
const token = otp.createToken(secret)
// Check the validity of a token.
const result = otp.isValid(secret, '<token>')
No significant changes other than dependency updates and restructuring of the codebase.
FAQs
The simplest all-in-one authentication library for JavaScript.
The npm package authenticus receives a total of 1 weekly downloads. As such, authenticus popularity was classified as not popular.
We found that authenticus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.