All Projects → remotebase → meteor-auth

remotebase / meteor-auth

Licence: MIT license
A user authentication solution for Mantra applications

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to meteor-auth

awesome-reactioncommerce
⚡️ A collection of awesome things regarding Reaction Commerce. Feel free to contribute!
Stars: ✭ 18 (-47.06%)
Mutual labels:  meteor
meteoro
Pomodoro App on Meteor
Stars: ✭ 31 (-8.82%)
Mutual labels:  meteor
react-tutorial
React Tutorial is the best place to learn how to use React and Meteor together
Stars: ✭ 33 (-2.94%)
Mutual labels:  meteor
blaze-integration
Vue integration with Meteor's Blaze rendering engine.
Stars: ✭ 24 (-29.41%)
Mutual labels:  meteor
Meteor-Template-helpers
Template helpers for Session, logical operations and debug
Stars: ✭ 35 (+2.94%)
Mutual labels:  meteor
meteor-autoform-bs-datepicker
Custom "bootstrap-datepicker" input type for AutoForm
Stars: ✭ 25 (-26.47%)
Mutual labels:  meteor
Timbr V1
A web service that turns an arbitrary web page into structural JSON data and easy-to-use APIs with just a few clicks
Stars: ✭ 50 (+47.06%)
Mutual labels:  meteor
nativescript-ng2-drawer-seed
Nativescript template project with drawer support
Stars: ✭ 17 (-50%)
Mutual labels:  meteor
setup-meteor
Set up your GitHub Actions workflow with a specific version of Meteor.js
Stars: ✭ 17 (-50%)
Mutual labels:  meteor
meteorman
A DDP client with GUI (The Postman for Meteor)
Stars: ✭ 51 (+50%)
Mutual labels:  meteor
meteor-computed-field
Reactively computed field for Meteor
Stars: ✭ 18 (-47.06%)
Mutual labels:  meteor
fTboilerplate-SemanticUI
boilerplate meteor react react router V4 semantic ui
Stars: ✭ 13 (-61.76%)
Mutual labels:  meteor
constellation
Extensible dev console for Meteor
Stars: ✭ 62 (+82.35%)
Mutual labels:  meteor
qlicker
Open Source Clicker
Stars: ✭ 23 (-32.35%)
Mutual labels:  meteor
chatbot-bootstrap
A bootstrap application for building a web based chatbot
Stars: ✭ 23 (-32.35%)
Mutual labels:  meteor
meteor-elastic-apm
Meteor Elastic APM integration
Stars: ✭ 56 (+64.71%)
Mutual labels:  meteor
meteor-cluster
worker pool for meteor using node js native `cluster` module
Stars: ✭ 18 (-47.06%)
Mutual labels:  meteor
tkzd
Meteor Project example ✨
Stars: ✭ 15 (-55.88%)
Mutual labels:  meteor
raspberry-noaa
Fully automated ISS SSTV, NOAA and Meteor satellite image downloader using Raspberry PI
Stars: ✭ 155 (+355.88%)
Mutual labels:  meteor
react-meteor
Meteor Reactivity for your React application, inspired by react-native-meteor.
Stars: ✭ 16 (-52.94%)
Mutual labels:  meteor

meteor-auth

A user authentication solution for Mantra applications

Installation

npm install -s meteor-auth

Usage

This module includes:

  • authComposer
  • EnsureLoggedIn

authComposer

Compose a component with authComposer using composeWithTracker. The component will reactively receive loggedIn and loggingIn props.

container

import {composeAll, composeWithTracker} from 'mantra-core';
import MyComponent from '../components/my_component.jsx';
import {authComposer} from 'meteor-auth';

// ...

return composeAll(
  composeWithTracker(authComposer),
)(MyComponent);

component

import React form 'react'

const MyComponent = ({loggedIn, loggingIn}) => (
  {
    loggedIn ? <div>Welcome</div> :
    loggingIn ? <div>Loading...</div> : <div>Please log in</div>
  }
);

EnsureLoggedIn

Wrap a content with <EnsureLoggedIn> to make sure only logged in users can see the content.

import React form 'react'
import {EnsureLoggedIn} from 'meteor-auth';

const MyComponent = () => (
  <EnsureLoggedIn>
    <div>Welcome</div>
  </EnsureLoggedIn>
);

props

unauthenticatedMessage

  • type: React component
  • Replace the default component displayed when user is not logged in
  • example:
const Dashboard = () => (
  <EnsureLoggedIn unauthenticatedMessage={NotLoggedInMessage}>
    <DashboardView />
  </EnsureLoggedIn>
);

const NotLoggedInMessage = (
  <div>
    Please login. <a href="/">Go back to the main page</a>.
  </div>
);

Production ready

We are using meteor-auth in RemoteBase to serve actual users.

License

MIT

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].