JavaScript for Line of Business Applications
596.1K views | +0 today
Follow
JavaScript for Line of Business Applications
Keeping track of current JavaScript Frameworks that help design your clientside Business Logic Layers.
Curated by Jan Hesse
Beam to my Inbox:
Your new post is loading...
Your new post is loading...

Popular Tags - Filter using the Funnel

Current selected tags: 'Sails.js', 'authentication'. Clear
Scoop.it!

How to use JSON web token authentication with Sails.js

How to use JSON web token authentication with Sails.js | JavaScript for Line of Business Applications | Scoop.it
Using JSON webtoken authentication for consuming rest-api from your Single Page Application is pretty common these days. In this post I'll be helping you to use it in your Sails.js App. Well'll be using simplest user name and password...
No comment yet.
Scoop.it!

Tutorial: Easy authentication for Sails.js apps

Tutorial: Easy authentication for Sails.js apps | JavaScript for Line of Business Applications | Scoop.it
Learn how to quickly setup Twitter, Facebook or local authentication for your Sails.js app using Passport.js and sails-generate-auth.
No comment yet.
Scoop.it!

Sails.js Social Auth example with Passport and MongoDB

Sails.js Social Auth example with Passport and MongoDB | JavaScript for Line of Business Applications | Scoop.it

Authenticate via PassportJS using Facebook or Google+ or GitHub Accounts

No comment yet.
Scoop.it!

User Authentication with Sails.js

User Authentication with Sails.js | JavaScript for Line of Business Applications | Scoop.it

I’m going to start building an example application using Sails and the first step is user authentication. I’m going to be building this as an API, so all of the example will simply use GET and POST requests to the REST API that Sails makes so easy for us. Let’s dive in.

Since what we are trying to do is accomplish user authentication, the first thing we need to do is create our user resource. Since Sails provides us with generators similar to the way Rails works, we can do this with one simple command.

No comment yet.
Scoop.it!

Implement Passport.js authentication with Sails.js ~0.10

Sails.js v0.10.5 - Passport.js v0.2.1 - Waterline ORM v0.10...


Due to the number of outdated examples about this subject that I've seen on the web, I might save your day by writing an updated, working one, by myself.

No comment yet.
Scoop.it!

Json Web Tokens: Examples

Imagine a web app. You browse it and you decide you want to register yourself. Then you put your credentials on a login form. The web page will send you a token via JSON. What can you do with that token? In that concrete app, you can access your user profile, your messages or even add new friends.

The same fact applies: You can access your profile but not others profiles (Imagining they are private) and you can’t certainly remove friends from your partner account :P

Now that we have an idea of how JWT works, let’s see it from a more technique perspective.

A JWToken is self-contained, so when we create one, it will have all the necessary pieces needed inside of it. What are those pieces? A token is divided in 3 parts:

  • A header
  • A payload
  • A signature
No comment yet.
Scoop.it!

Protected Resources with Sails.js

Protected Resources with Sails.js | JavaScript for Line of Business Applications | Scoop.it

 In this post we will be creating a resource that our user owns and learn how to create access control around that resource. Sails makes it pretty easy to accomplish.

The next thing we need to do is create our Entry resource. This is the resource that is going to represent one day’s journal entry. Thanks to the generate commands provided by Sails.js this is easily accomplished. From your project root, type the following command...

No comment yet.
Scoop.it!

Using Passport.JS with Sails.JS

This is the tutorial I wish I had for integrating Passport.js with Sails.js. When creating web applications, you'd love to have a user sign-in and sign-out function, while limiting access to certain functions if the visitor is merely a guest.

Enter Passport.js. This fantastic piece of unobtrusive Express middleware provides many mechanisms of authorization, including the usual username/password, or even social media such as Twitter and Facebook.

Sails.js is based off Express, so we'd expect Passport.js to slide in nicely, and it certainly does. Without further ado, let's get to making an application!

No comment yet.