npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

onlyauth

v0.1.2

Published

OnlyAuth 2FA API Javascript Library

Downloads

2

Readme

OnlyAuth Javascript Library

Sign up for OnlyAuth 2FA API

Sign up for the OnlyAuth 2FA API to get your API credentials.

Installation Guide

Check out the OnlyAuth 2FA API Implementation guide for full details.

SDK Installation

For Node.js

npm

Install it via:

npm install onlyauth --save

Finally, you need to build the module:

npm run build

git

Install it via:

    npm install onlyauth-io/onlyauth-javascript

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

import onlyauth from 'onlyauth';
let defaultClient = onlyauth.ApiClient.instance;
// Configure Bearer (API Secret) access token for authorization: BearerAuth
let BearerAuth = defaultClient.authentications['BearerAuth'];
BearerAuth.accessToken = "API SECRET"

let apiInstance = new onlyauth.AuthenticationApi();
let appId = "appId_example"; // String | Uuid of the OnlyAuth App (APPX-XXX)
let clientId = "clientId_example"; // String | Uuid of you in the OnlyAuth Platform (CLNT-XXX)
let endUserPhoneNumber = "endUserPhoneNumber_example"; // String | Phone number of the end user (E164 format)
let endUserUuid = "endUserUuid_example"; // String | Uuid of the end user (any type)
let redirectUri = "redirectUri_example"; // String | URL to redirect to after authentication
let language = "language_example"; // String | Language code (e.g., en-US)
let region = "region_example"; // String | Region code (us-1)
apiInstance.createAccessToken(appId, clientId, endUserPhoneNumber, endUserUuid, redirectUri, language, region).then((data) => {
  console.log('API called successfully. Token: ' + data.token);
}, (error) => {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://api.onlyauth.io

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- OnlyAuth.AppsApi | deleteApp | DELETE /apps/{app_id} | Delete an app OnlyAuth.AppsApi | getAppById | GET /apps/{app_id} | Get an app by uuid OnlyAuth.AppsApi | getApps | GET /apps | Get all apps OnlyAuth.AppsApi | newApp | POST /apps | Create a new app OnlyAuth.AppsApi | updateApp | POST /apps/{app_id} | Update an app OnlyAuth.AuthenticationApi | createAccessToken | POST /server/access-tokens/new | Creates a short-lived JWT token to integrate the widget OnlyAuth.AuthenticationApi | validateSuccessToken | GET /server/success-tokens | Validates a success token after user completes authentication

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: Bearer authentication (API Secret)