![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
An Authy client for node.js using generators via co.
$ npm install co-authy
To use co-authy
you must be running node 0.11.9 or higher for generator support and node must be ran with the --harmony
flag.
Initialize a new Authy Client.
apiKey
Required.apiUrl
Defaults to production endpoint (https://api.authy.com
).Enable two-factor authentication on a user. You should store the returned authy_id
in your database for subsequent calls.
Cellphone numbers are validated against a lenient validator to make sure only possible number are sent to the Authy API.
The countryCode
can be one of the following:
The library automatically converts conforming country codes to the corresponding calling code. For instance, if the countryCode
passed is PT
, then the calling code will be set to 351
without requiring extra work from the developer. Defaults to US (1
) if omitted.
The list of countries is sourced from the awesome countries project by @mdledoze with added support for special International Networks codes +882 and +883.
Verify a token entered by the user. Enable the force
parameter to verify the token regardless of the user login status.
The token format is verified through an TOTP token validator.
Request an SMS with a token for users that don't own a smartphone. If the Authy app is in use by the user, this request is ignored and a push notification is sent instead. Pass force
to send an SMS regardless of this. You can also use the shortcode
option to send the SMS using short code (available in US and Canada).
Available options: ['force', 'shortcode']
Request a call with a token for users that don't own a smartphone or are having trouble with SMS. If the Authy app is in use by the user, this request is ignored. Pass force
to call the user regardless of this.
Delete an user from the application.
Retrieve an user status.
Register an user activity.
Retrieves the application details.
Retrieves the application statistics.
A basic example on how to register a user using the Authy client via the sandbox API. To use this example, you should register on Authy and then pass your own API secret key via the AUTHY_KEY
environment variable.
var assert = require('assert');
var client = require('co-authy')(process.env.AUTHY_KEY, 'http://sandbox-api.authy.com');
var co = require('co');
co(function *() {
var response = yield client.registerUser('rui.marinho@seegno.com', '123456789', '351');
assert('number' === typeof response.user.id);
console.log('AuthyID:', response.user.id);
})();
$ AUTHY_KEY=<secret key> node --harmony index.js
All public method are unit tested using nock
for mocked responses.
$ npm test
If you wish to run the tests by hitting the actual URLs, you may disable nock
entirely and pass your own API secret key via the AUTHY_KEY
environment variable. The sandbox API is often reset which means tests may fail when running against the actual sandbox API endpoints.
$ NOCK_OFF=true AUTHY_KEY=<secret key> npm test
MIT
FAQs
An Authy client based on generators
The npm package co-authy receives a total of 0 weekly downloads. As such, co-authy popularity was classified as not popular.
We found that co-authy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.