https://github.com/densu341/api-auth
Simple OAuth Multirole API Open for Universal Integration
https://github.com/densu341/api-auth
expressjs jwt-token nodejs sequelize-orm
Last synced: 11 months ago
JSON representation
Simple OAuth Multirole API Open for Universal Integration
- Host: GitHub
- URL: https://github.com/densu341/api-auth
- Owner: Densu341
- Created: 2024-02-09T15:49:33.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-15T19:58:21.000Z (almost 2 years ago)
- Last Synced: 2025-01-07T23:19:35.436Z (about 1 year ago)
- Topics: expressjs, jwt-token, nodejs, sequelize-orm
- Language: JavaScript
- Homepage:
- Size: 98.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Base URL: http://localhost/api/v1/auth
## API Reference
### Login
```http
POST /
```
| Parameter | Type | Description |
| :--------- | :------- | :-------------------------------------- |
| `email` | `string` | **Required**. Email of user to login |
| `password` | `string` | **Required**. Password of user to login |
| Response | Type | Description |
| :-------- | :------- | :----------------------------------------- |
| `success` | `Object` | _status_ : 200, _message_: "Login Success" |
| `error` | `Object` | _status_ : 400, _message_: "Fail" |
### Register
```http
POST /register
```
| Parameter | Type | Description |
| :----------------- | :------- | :--------------------------------------- |
| `fullname` | `string` | **Required**. Name of user to create |
| `email` | `string` | **Required**. Email of user to create |
| `password` | `string` | **Required**. Password of user to create |
| `password_confirm` | `string` | **Required**. confirm of user to create |
| Response | Type | Description |
| :-------- | :------- | :---------------------------------------------------------------- |
| `success` | `Object` | _status_ : 200, _message_: "You have register successfully" |
| `error` | `Object` | _status_ : 400, _message_: "Your record already exists with us!!" |