Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
auth-service-module-prodio
Advanced tools
auth-service-module-prodio
is an node js client for the auth-service-prodio API
. Integrate in to any application to perform auth releted user journeys.
auth-service-prodio
uses loopback as the core framework for developing API's, so all customisations, configurations, middlewares, events, and db connectors can be used which you would have used in loopback.
$ npm install auth-module-prodio --save
Require the auth-module-prodio module and initialize the notificationSdk client.
const auth = require('auth-service-module-prodio');
const authModule = new auth("API BASE PATH OF AUTH SERVICE");//http://domainname:3005/api
1. Signup/Register:
This will create/register a new account.
Key | Type | Value | Description | Required |
---|---|---|---|---|
action | string | REGISTERACCOUNT | key which defines the type of action to be performed | YES |
meta | json | refer example below | - | YES |
const emailMetaInfo = {
"email": "",
"password": ""
};
const otpMetaInfo = {
"phone": ""
}
const payload = {
"action": "REGISTERACCOUNT",
"meta": emailMetaInfo // or otpMetaInfo
};
let account = authModule.execute(payload);
2. Verify Account Token:
This will verify an account.
Key | Type | Value | Description | Required |
---|---|---|---|---|
action | string | VERIFYTOKEN | key which defines the type of action to be performed | YES |
meta | json | refer example below | - | YES |
const emailMetaInfo = {
"verificationToken": ""
};
const otpMetaInfo = {
"phone": "",
"otp": ""
}
const payload = {
"action": "VERIFYTOKEN",
"meta": emailMetaInfo // or otpMetaInfo
};
let verify = authModule.execute(payload);
3. Generate email verification token or otp:
This will regenerate verification tokens.
Key | Type | Value | Description | Required |
---|---|---|---|---|
action | string | GENERATETOKEN | key which defines the type of action to be performed | YES |
meta | json | refer example below | - | YES |
const emailMetaInfo = {
"email": ""
};
const otpMetaInfo = {
"phone": ""
}
const payload = {
"action": "GENERATETOKEN",
"meta": emailMetaInfo // or otpMetaInfo
};
let token = authModule.execute(payload);
4. Login:
This will validate login of an account if email based. If otp based, will generate an otp which will have to verified using verify account token method(2).
Key | Type | Value | Description | Required |
---|---|---|---|---|
action | string | LOGIN | key which defines the type of action to be performed | YES |
meta | json | refer example below | - | YES |
const emailMetaInfo = {
"email": "",
"password":""
};
const otpMetaInfo = {
"phone": ""
}
const payload = {
"action": "LOGIN",
"meta": emailMetaInfo // or otpMetaInfo
};
let login = authModule.execute(payload);
5. List accounts:
This will list all the accounts.
Key | Type | Value | Description | Required |
---|---|---|---|---|
action | string | LISTACCOUNTS | key which defines the type of action to be performed | YES |
meta | json | refer example below | - | YES |
const payload = {
"action": "LISTACCOUNTS"
};
let accounts = authModule.execute(payload);
6. Forgot Password:
Only for email based auth. It will generate an token which will be required when resetting the password.
Key | Type | Value | Description | Required |
---|---|---|---|---|
action | string | FORGOTPASSWORD | key which defines the type of action to be performed | YES |
meta | json | refer example below | - | YES |
const emailMetaInfo = {
"email": ""
};
const payload = {
"action": "FORGOTPASSWORD",
"meta": emailMetaInfo
};
let forgot = authModule.execute(payload);
7. Reset Password:
Only for email based auth. Based on the token generated in forgot password, new password can be created.
Key | Type | Value | Description | Required |
---|---|---|---|---|
action | string | RESETPASSWORD | key which defines the type of action to be performed | YES |
meta | json | refer example below | - | YES |
const emailMetaInfo = {
"verificationToken": "",
"password": ""
};
const payload = {
"action": "RESETPASSWORD",
"meta": emailMetaInfo
};
let reset = authModule.execute(payload);
8. Change Password:
Only for email based auth. Change an existing password.
Key | Type | Value | Description | Required |
---|---|---|---|---|
action | string | CHANGEPASSWORD | key which defines the type of action to be performed | YES |
meta | json | refer example below | - | YES |
const emailMetaInfo = {
"email": "",
"oldPassword": "",
"newPassword": ""
};
const payload = {
"action": "CHANGEPASSWORD",
"meta": emailMetaInfo
};
let change = authModule.execute(payload);
8. Delete Account:
Will delete the account and no other action can be done using the account further.
Key | Type | Value | Description | Required |
---|---|---|---|---|
action | string | DELETEACCOUNT | key which defines the type of action to be performed | YES |
meta | json | refer example below | - | YES |
const emailMetaInfo = {
"email": "",
};
const otpMetaInfo = {
"phone": ""
}
const payload = {
"action": "DELETEACCOUNT",
"meta": emailMetaInfo // or otpMetaInfo
};
let delete = authModule.execute(payload);
FAQs
NPM for consuming prodio auth service
The npm package auth-service-module-prodio receives a total of 16 weekly downloads. As such, auth-service-module-prodio popularity was classified as not popular.
We found that auth-service-module-prodio demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.