-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Welcome to the node-express-mysql-sequelize wiki!
prefix: /api
User Signup
User Login
Forgot Password
Validate Reset Password Token
Reset Password
Change Password
Resend Verification Email
Email Verify
User signup, send verification mail.
POST /auth/signup
Name | Type | Mandatory | Description |
---|---|---|---|
String | YES | User email | |
password | String | YES | User password. (min 8 chars, strong password) |
-
Success Result
status code:
200{ "result": "ok", "data": { } }
-
Failed Result
status code:
400{ "result:": "error", "message": error_string }
User login.
POST /auth/login
Name | Type | Mandatory | Description |
---|---|---|---|
String | YES | User email | |
password | String | YES | User password. (min 8 chars, strong password) |
-
Success Result
status code:
200{ "result": "ok", "data": { } }
-
Failed Result
status code:
400{ "result:": "error", "message": error_string }
Forgot User Password. Receive rest password token into Email
POST /auth/forgot-password
Name | Type | Mandatory | Description |
---|---|---|---|
String | YES | User email |
-
Success Result
status code:
200{ "result": "ok", "data": "We sent reset password token to your email" }
-
Failed Result
status code:
400{ "result:": "error", "message": error_string }
Check if reset password token is valid.
POST /auth/validate-reset-password
Name | Type | Mandatory | Description |
---|---|---|---|
String | YES | User email | |
resetPasswordToken | String | YES | resetPassword token received in email |
-
Success Result
status code:
200{ "result": "ok", }
-
Failed Result
status code:
400{ "result:": "error", "message": error_string }
Update User Password.
POST /auth/reset-password
Name | Type | Mandatory | Description |
---|---|---|---|
String | YES | User email | |
resetPasswordToken | String | YES | resetPassword token received in email |
newPassword | String | YES | User new password |
-
Success Result
status code:
200{ "result": "ok", "data": "Your new password has been set successfully" }
-
Failed Result
status code:
400{ "result:": "error", "message": error_string }
Change User Password._
POST /auth/change-password
Name | Type | Mandatory | Description |
---|---|---|---|
newPassword | String | YES | User new password |
-
Success Result
status code:
200{ "result": "ok", "data": "Your new password has been set successfully" }
-
Failed Result
status code:
400{ "result:": "error", "message": error_string }
Resend Verification Email.
POST /auth/verificatio-nemail
Name | Type | Mandatory | Description |
---|---|---|---|
String | YES | User email |
-
Success Result
status code:
200{ "result": "ok", "message": "Verification email sent" }
-
Failed Result
status code:
400{ "result:": "error", "message": error_string }
Email Verify.
GET /auth/confirm-email
Name | Type | Mandatory | Description |
---|---|---|---|
token | String | YES | Email verification token received in email |
-
Success Result
status code:
200{ "result": "ok", "message": "Email verified. Your account is active now" }
-
Failed Result
status code:
400{ "result:": "error", "message": error_string }