/hyper-oauth

Primary LanguageJavaScript

Unofficial SDK for Hyper

You can view official api documentation here

Currently only oauth functionality is built.

Features

Hyper

Usage

const Hyper = require('hyper-oauth');
const hyper = new Hyper({
  domain: 'https://yummyfnf.hyper.co',
  publishableKey: 'pk_...',
  secretKey: 'sk_...',
});

Parameters

  • domain - your dashboards domain
  • publishableKey - your dashboards publishable api key
  • secretKey - your dashboards secret api key

hyper.oauth.authorize

Usage

const Hyper = require('hyper-oauth');
const hyper = new Hyper({ domain: "https://yummyfnf.hyper.co"});

const result = await hyper.oauth.authorize();

Parameters

  • successUrl - Optional redirect url after logging in
  • urlOpener - Optional custom function to handle opening url (uses open by default)
  • grantType - Available options: user, license (defaults to license)