You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An authentication module's task is to verify the identity of users or entities accessing a system or service, ensuring only authorized access.
Database Structure
1. Table : users
Field
Datatype
Required
Note
id
Int(8)
Yes
Primary Key
email
varchar(128)
Yes
Index
password
varchar(128)
Yes
firstname
varchar(128)
No
lastname
varchar(128)
No
username
varchar(128)
No
Index
country_code
int(8)
No
mobile_number
varchar(32)
No
verified_at
timestamp
No
created_at
timestamp
Yes
Created timestamp
updated_at
timestamp
No
deleted_at
timestamp
No
created_by
Int(8)
No
updated_by
Int(8)
No
deleted_by
Int(8)
No
Note
The users table will include only these specific fields. If you need to store additional user details, you should create a separate profile table with the relevant fields. This table will incorporate a user_id field to establish a one-to-one relationship.
2. Table : profile
Warning
Please note that the profile table is optional, you should only create it if you intend to include additional user-related fields.
Field
Datatype
Required
Note
id
Int(8)
Yes
Primary Key
user_id
Int(8)
Yes
Foreign Key: users
created_at
timestamp
Yes
Created timestamp
updated_at
timestamp
No
deleted_at
timestamp
No
created_by
Int(8)
No
updated_by
Int(8)
No
deleted_by
Int(8)
No
...
...
...
All the other additional user-related fields
3. Table : user_otps
Field
Datatype
Required
Note
id
Int(8)
Yes
Primary Key
user_id
Int(8)
Yes
Index
otp
varchar(32)
Yes
otp_for
enum('verification','reset_password')
Yes
Index
verified_at
timestamp
No
created_at
timestamp
Yes
Created timestamp
updated_at
timestamp
No
deleted_at
timestamp
No
Role and Permission
By default, the system should have an admin and user role. Kindly use the Laravel Permission package for that.
Endpoints
Important
For all endpoints that require authentication, kindly ensure that the token is included in the Authorization header of the API request.
Authentication Module
An authentication module's task is to verify the identity of users or entities accessing a system or service, ensuring only authorized access.
Database Structure
1. Table :
users
Note
The
users
table will include only these specific fields. If you need to store additional user details, you should create a separateprofile
table with the relevant fields. This table will incorporate auser_id
field to establish a one-to-one relationship.2. Table :
profile
Warning
Please note that the
profile
table is optional, you should only create it if you intend to include additional user-related fields.users
3. Table :
user_otps
Role and Permission
By default, the system should have an admin and user role. Kindly use the Laravel Permission package for that.
Endpoints
Important
For all endpoints that require authentication, kindly ensure that the token is included in the Authorization header of the API request.
Base URL :
api/v1/
user_otps
table.Request Object
Response Object
The text was updated successfully, but these errors were encountered: