Coder Social home page Coder Social logo

authrocket's Introduction

AuthRocket

NPM version NPM downloads Build Status Dependency Status Code Climate Code Coverage License Code Style

NodeJS library for interfacing with Auth Rocket.

Why Not Use AuthRocket's authrocket.js?

Authrocket.js requires including jQuery and is therefore not a useful solution for running on NodeJS or within a front end project that doesn't use jQuery. Also, the API for the default AuthRocket library only provides methods for LoginRocket actions as it is for client side usage only.

Warning: Not officially supported by Auth Rocket.

Documentation

Documentation is automatically generated from comments using gulp-esdoc. To view a hosted version of the documentation view the docs page.

Getting Started

  1. Install through npm: npm install --save authrocket
  2. Import AuthRocket:

NodeJS

var AuthRocket = require('authrocket');

ES6

import AuthRocket from 'authrocket';

Browser

<script src="node_modules/authrocket/dist/authrocket.js"></script>
<!--
Also available through CDN using:
<script src="http://cdn.prue.io/authrocket/latest/authrocket.js"></script>
-->
  1. Create a new AuthRocket instance:
//Create new authrocket instance with authrocket.js URL
var authrocket = new AuthRocket({jsUrl: 'https://zzzzzzzzz.e1.loginrocket.com/v1/'});

Configuration

Config variables can be set when you are creating your AuthRocket instance or through environment variables. Using environment variables is suggested for variables that should be kept private, such as your JWT secret.

LoginRocket capabilities (Login/Logout/Signup)

authrocket.js URL

Options Variable: jsUrl

Environment Variable: AUTHROCKET_JS_URL

Management Functionality (usually server side)

Account ID

Options Variable: accountId

Environment Variable: AUTHROCKET_ACCOUNT_ID

API key

Options Variable: apiKey

Environment Variable: AUTHROCKET_API_KEY

Realm Id

Options Variable: realmId

Environment Variable: AUTHROCKET_REALM_ID

API URL

Options Variable: apiUrl

Environment Variable: AUTHROCKET_API_URL

Other vars

JWT Secret

Options Variable: jwtSecret

Environment Variable: AUTHROCKET_JWT_SECRET

authrocket's People

Contributors

dyerw avatar prescottprue avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.