
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
simple-auth-cli
Advanced tools
An implementation of authentication system supporting multiple providers ready to be used with a single command.
A robust authentication system implementation supporting multiple providers that can be integrated into your Node.js application with a single command.
Traditional Authentication
OAuth2.0 Providers
Two-Factor Authentication (2FA)
npx simple-auth-cli
npx simple-auth-cli
.env:# Database
MONGODB_URI=your_mongodb_uri
# JWT
ACCESS_TOKEN_SECRET=your_access_token_secret
REFRESH_TOKEN_SECRET=your_refresh_token_secret
ACCESS_TOKEN_EXPIRY=1d
REFRESH_TOKEN_EXPIRY=10d
# OAuth Credentials
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_TOKEN_HOST=https://oauth2.googleapis.com
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
GITHUB_TOKEN_HOST=https://github.com
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
SPOTIFY_TOKEN_HOST=https://accounts.spotify.com
# Similarly add for other providers
# Cloudinary (for avatar storage)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Email Service
RESEND_API_KEY=your_resend_api_key
# Application
APPNAME=your_app_name
APPURL=your_app_url
POST /api/v1/users/register - Register new userPOST /api/v1/users/login - Login userPOST /api/v1/users/logout - Logout userPOST /api/v1/users/generateNewTokens - Refresh access tokenGET /api/v1/users/oauth - Initialize OAuth flowGET /api/v1/users/auth/oauth/:provider/callback - OAuth callback URLsPOST /api/v1/users/verify - Verify emailPOST /api/v1/users/forgotPassword - Request password resetPOST /api/v1/users/changePassword - Change passwordPOST /api/v1/users/changeEmail - Change emailPOST /api/v1/users/changeUserName - Change usernamePATCH /api/v1/users/updateAvatar - Update profile picturePOST /api/v1/users/initialize2FA - Setup 2FAPOST /api/v1/users/verify2FA - Verify 2FAPOST /api/v1/users/verify2FALogin - Login with 2FAThe system implements a centralized error handling mechanism with detailed error messages and appropriate HTTP status codes.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
FAQs
An implementation of authentication system supporting multiple providers ready to be used with a single command.
We found that simple-auth-cli demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.