Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tfa-node-sdk

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tfa-node-sdk - npm Package Compare versions

Comparing version 1.1.0 to 1.1.2

14

lib/tfa.js

@@ -11,6 +11,16 @@ const axios = require('axios');

.then((response) => {
return response;
const data = {
status: response.status,
data: response.data,
}
return data;
})
.catch((error) => {
return error;
const data = {
status: error.response.status,
data: error.response.data,
}
return data;
});

@@ -17,0 +27,0 @@ }

@@ -13,6 +13,16 @@ import axios from 'axios';

.then((response) => {
return response;
const data = {
status: response.status,
data: response.data,
}
return data;
})
.catch((error) => {
return error;
const data = {
status: error.response.status,
data: error.response.data,
}
return data;
});

@@ -19,0 +29,0 @@ }

2

package.json
{
"name": "tfa-node-sdk",
"version": "1.1.0",
"version": "1.1.2",
"description": "Telegram Factor Authentication node library",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -53,10 +53,10 @@ # Telegram Factor Authentication - Node SDK

result.then((result) => {
const resultObject = result.response.data;
const statCode = result.response.status;
const data = result.data;
const statCode = result.status;
if (statCode === 200) {
console.log('Authenticated.');
const user = resultObject.user;
const user = data.user;
console.log(user);
} else {
console.log(resultObject.message);
console.log(data.message);
}

@@ -78,3 +78,2 @@ });

{
"error": 800,
"user": {

@@ -81,0 +80,0 @@ "_id": "document id",

const tfa = require('tfa-node-sdk');
const auth = new tfa('ZmErsKQcfaODiKAZdopcwQEjW');
const auth = new tfa('WuBjwvrQencoplabrUtPvDKaz');
const result = auth.authUser('PemBvQIQBjSxKQrChoFRDzCoh');
const result = auth.authUser('uAMGSFEFDQUevEHWulAMHIBtz');
result.then((result) => {
const resultObject = result.response.data;
const statCode = result.response.status;
const data = result.data;
const statCode = result.status;
if (statCode === 200) {
console.log('Authenticated.');
const user = resultObject.user;
const user = data.user;
console.log(user);
} else {
console.log(resultObject.message);
console.log(data.message);
}
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc