
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ahextech-user
Advanced tools
A package for user management functionalities including registration, OTP verification, and sign-in.
The ahextech-user package provides user management functionalities including registration, email and phone number verification, OTP generation and validation, and user sign-in.
To install the package, use:
npm install ahextech-user
Make sure to set the following environment variables in your project:
PORT=yoour_port
MONGO_URI=your_mongodb_uri
DATABASE_NAME= your_database_name
MONGODB_USER=db_user
MONGODB_PASSWORD = your_db_user_password
JWT_SECRET=your_jwt_secret
EMAIL_SERVICE=your_email_service_provider
EMAIL_USER=your_email_user
EMAIL_PASS=your_email_password
TWILIO_ACCOUNT_SID=your_twilio_account_sid
TWILIO_AUTH_TOKEN=your_twilio_auth_token
TWILIO_PHONE_NUMBER=your_twilio_phone_number
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_OAUTH_REDIRECT_URL= your_google_redirection_url
SUCCESS_REDIRECT= your_success_screen_url_after_successful_googlesso
FAILURE_REDIRECT=your_failed_screen_url_after_failed_googlesso
/registerPOSTfirstName (string, required)lastName (string, required)email (string, required)password (string, required)phoneNumber (string, required){
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"password": "password123",
"phoneNumber": "1234567890"
}
/verify/email-otpPOSTemail (string, required)emailOTP (string, required){
"email": "john.doe@example.com",
"emailOTP": "123456"
}
/resend/email-otpPOSTemail (string, required){
"email": "john.doe@example.com"
}
/verify/sms-otpPOSTemail (string, required)phoneNumber (string, required)smsOTP (string, required){
"email": "john.doe@example.com",
"phoneNumber": "1234567890",
"smsOTP": "654321"
}
/resend/sms-otpPOSTemail (string, required)phoneNumber (string, required){
"email": "john.doe@example.com",
"phoneNumber": "1234567890"
}
/signinPOSTemail (string, required)password (string, required){
"email": "john.doe@example.com",
"password": "password123"
}
For getting clientID, ClientSecret from googole-auth do follow this steps Word.
Initiate Google Authentication:
/googleGETGoogle SSO Callback:
/google/callbackGETSuccess Page:
/successGETFailure Page:
For a detailed implementation of Google SSO using Passport.js and how it integrates with this project, watch this Loom video.
The package uses Joi for request validation. The following validators are included:
validateRegisterUser - Validates user registration data.validateLoginUser - Validates user login data.validateOTPViaEmail - Validates email OTP.validatResendEmailOTP - Validates resend email OTP request.validateOTPViaPhoneNumber - Validates phone number OTP.validatResenSMSOTP - Validates resend SMS OTP request.validateSignIn - Validates user sign-in data.The following services are provided for user management:
registerUser - Registers a new user.uniqueUserCheck - Checks if a user with the given email already exists.updateOTPs - Updates OTPs for email and phone verification.verifyOTPViaEmail - Verifies email OTP.verifyOTPViaSMS - Verifies phone number OTP.findUser - Finds a user by email.This project is licensed under the ISC License.
FAQs
A package for user management functionalities including registration, OTP verification, and sign-in.
We found that ahextech-user demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.