
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
Re-usable authentication library.
npm install authwith --save
Available implementations:
OAuth2OpenIDConnectNote: request (req: Request) => Promise<Response> must be provided for each implementation to support external requests (uses Servie interfaces).
import { OAuth2 } from 'authwith'
const auth = new OAuth2(options, request)
authorizationUri The URL to redirect the user for authorizationaccessTokenUri The URL to retrieve the access tokenprofileUri The URL to request user informationThese are passed as the final option to each method:
clientId The client id issued by the OAuth 2.0 serverclientSecret The client secret issued by the OAuth 2.0 serverredirectUri A URL on your server to receive callbacks from the OAuth 2.0 serverscope The requested scope stringstate? An optional state to be verified on callbackauth.getRedirectUri(params) methodauth.getToken(uri, params) - this will make a request and return the access tokenauth.getProfile(token, params) - this will retrieve the users profile informationauth.refreshToken(refreshToken, params)import { OpenIDConnect } from 'authwith'
const auth = new OpenIDConnect(options, request)
authorizationUri The URL to redirect the user for authorizationaccessTokenUri The URL to retrieve the access tokenissuer The issuer string for the ID tokenExtends OAuth2 parameters:
nonce? Verifies the nonce when reading the profile informationmaxAge? Verifies the max age when reading the profile informationtimestamp? Used in conjunction with maxAge to verify auth_time claimOpenID Connect is built on top of OAuth 2.0. Internally, it will use the id_token instead of making a separate request for profile information.
This project is written using TypeScript and publishes the definitions directly to NPM.
Apache 2.0
FAQs
Re-usable authentication library
The npm package authwith receives a total of 2 weekly downloads. As such, authwith popularity was classified as not popular.
We found that authwith 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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.