All Projects → xcv58 → meteor-auth0

xcv58 / meteor-auth0

Licence: MIT License
Auth0 Login Flow for Meteor apps

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to meteor-auth0

Meteor-Mailer
📮 Bulletproof email queue on top of NodeMailer with support of multiple clusters and servers setup
Stars: ✭ 21 (+5%)
Mutual labels:  meteor, atmosphere
blaze-magic-events
A new way of binding event handlers to html elements for Meteor's Blaze.
Stars: ✭ 26 (+30%)
Mutual labels:  meteor
meteor-bootstrap-tagsinput
Bootstrap Tags Input packaged for Meteor Platform
Stars: ✭ 12 (-40%)
Mutual labels:  meteor
svelte-meteor-data
Reactively track Meteor data inside Svelte components
Stars: ✭ 14 (-30%)
Mutual labels:  meteor
Meteor-logger
🧾 Meteor isomorphic logger. Store application logs in File (FS), MongoDB, or print in Console
Stars: ✭ 51 (+155%)
Mutual labels:  meteor
meteor-google-spreadsheets
Google Spreadsheets for Meteor
Stars: ✭ 53 (+165%)
Mutual labels:  meteor
meteor-server-autorun
Server-side Tracker.autorun
Stars: ✭ 36 (+80%)
Mutual labels:  meteor
RegESM
Regional Earth System Model
Stars: ✭ 37 (+85%)
Mutual labels:  atmosphere
meteor-presence
👥 Meteor package to help track users' presence
Stars: ✭ 88 (+340%)
Mutual labels:  meteor
meteor-vuetify
Experimenting with using Vuetify on a Meteor project.
Stars: ✭ 18 (-10%)
Mutual labels:  meteor
meteor-postcss
PostCSS for Meteor
Stars: ✭ 68 (+240%)
Mutual labels:  meteor
meteor-stat
Get a simple analysis of your Meteor app
Stars: ✭ 22 (+10%)
Mutual labels:  meteor
Meteor-Remember-Me
Meteor accounts extension with remember me functionality
Stars: ✭ 13 (-35%)
Mutual labels:  meteor
pwa-meteor
meteor based pwa
Stars: ✭ 14 (-30%)
Mutual labels:  meteor
meteor-publication-collector
Test a Meteor publication by collecting its output.
Stars: ✭ 32 (+60%)
Mutual labels:  meteor
latelier
L'atelier, a project management tool
Stars: ✭ 74 (+270%)
Mutual labels:  meteor
DSMACC
Dynamically Simple Model of Atmospheric Chemical Complexity
Stars: ✭ 16 (-20%)
Mutual labels:  atmosphere
Dermatron
Dermatology focused medical records software, augmented with computer vision and artificial intelligence [Meteor packaged with Electron]
Stars: ✭ 19 (-5%)
Mutual labels:  meteor
meteor-getting-started
Урок для хабры. Разработка первого метеор приложения.
Stars: ✭ 36 (+80%)
Mutual labels:  meteor
meteor-spacebars-tohtml
Meteor package to ease rendering spacebars to html
Stars: ✭ 35 (+75%)
Mutual labels:  meteor

Lock

Demo: https://auth0.xcv58.org

Auth0 is an authentication broker that supports social identity providers as well as enterprise identity providers such as Active Directory, LDAP, Google Apps and Salesforce.

Lock makes it easy to integrate SSO in your app. You won't have to worry about:

  • Having a professional looking login dialog that displays well on any device.
  • Finding the right icons for popular social providers.
  • Solving the home realm discovery challenge with enterprise users (i.e.: asking the enterprise user the email, and redirecting to the right enterprise identity provider).
  • Implementing a standard sign in protocol (OpenID Connect / OAuth2 Login)

Key features

  • Integrates your Meteor app with Auth0
  • Provides a beautiful native UI to log your users in.
  • Provides support for Social Providers (Facebook, Twitter, etc.), Enterprise Providers (AD, LDAP, etc.) and Username & Password.
  • Provides support for Meteor accounts so you develop your Meteor app as usual, in a clean and stright-forward way.

Requirements

You'll need Meteor 1.6.1+.

Install

Lock is available through Atmosphere. To install it, simply run the following command in your project folder:

meteor add xcv58:auth0-lock

Before Getting Started

Create a file named settings.json in your project folder. This file should have your Auth0 ClientId and Domain that you can get from our dashboard.

{
  "public": {
    "AUTH0_CLIENT_ID": "YOUR_CLIENT_ID",
    "AUTH0_DOMAIN": "YOUR_AUTH0_DOMAIN"
  }
}

Please remember to replace the respective values.

Usage

This Meteor package gives you access to an instance of Lock that is instantiated for you and stored in the global lock variable. There is no need to call new Auth0Lock(...); since this is already done by the package. You can call any of the Lock methods on this instance, and pass any of the options detailed in the documentation referenced below.

For example, you may call from inside a click event handler:

import { Meteor } from 'meteor/meteor';
import { initLock } from 'meteor/xcv58:auth0-lock';
Meteor.startup(function () {
  // This is required to handle login
  const Lock = initLock();
  Lock.show();
})

You are able to customize the Lock instance as well by calling initLock method. You can find example in https://github.com/xcv58/meteor-auth0/blob/master/examples/sample-app/client/main.js.

Any documented combination is valid.

To log out, you can just call Meteor.logout(); if you just want to log the user out of your app.

Or you may call Lock.logout(); if you want to log the user out of the social provider, for instance, but this will redirect the user outside your app to the social provider log out site.

Accessing User Details

To show any of the user details after logging in, you can use the currentUser helper in any of your Handlebar templates. You will find the user profile under currentUser.services.auth0.

{{> userName}}
<template name="userName">
  {{currentUser.services.auth0.name}}
</template>

You can access the user profile from the server through the Meteor.user() global getter, under the services.auth0 object.

const userName = Meteor.user().services.auth0.name;

Documentation

You can find the full documentation for Lock on the Auth0 docs site.

Example

The examples/sample-app directory has a ready-to-go app. In order to run it you need Meteor installed.

Then execute meteor --settings production.settings.json from the root of the example.

Finally, point your browser at http://localhost:3000/ and play around.

Browser Compatibility

We ensure browser compatibility in Chrome, Safari, Firefox and IE >= 9. We currently use zuul along with Saucelabs to run integration tests on each push.

Issue Reporting

If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

Publishing the package

An Atmosphere account for Auth0 should be created under the name auth0 to make it possible to call the package auth0:lock as indicated in package.js. The repo has to be cloned locally, and inside the lock folder (package folder) the following command must be run:

meteor publish --create

If the auth0 account credentials for Atmosphere were used during the Meteor installation, those credentials will be used to push the package to Atmosphere. If they were not, then they will be asked for after the previous command is run for the first time and cached thereafter.

This will publish the package, make it available in Atmosphere as well as creating a package site there.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].