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: 'Node.js', 'authentication'. Clear
Scoop.it!

Authenticate a Node.js API with JSON Web Tokens

Authenticate a Node.js API with JSON Web Tokens | JavaScript for Line of Business Applications | Scoop.it

Authentication is one of the big parts of every application. Security is always something that is changing and evolving.

We’ll build a quick API using Node and Express and we’ll be using POSTman to test it.

The main workflow of this is that we will:

  1. Have unprotected and protected routes
  2. A user will authenticate by passing in a name and a password and get back a token
  3. The user will store this token on their client-side and send it for every request
  4. We will validate this token, and if all is good, pass back information in JSON format
No comment yet.
Scoop.it!

Twitatron: Building a production web app with Node

Twitatron: Building a production web app with Node | JavaScript for Line of Business Applications | Scoop.it

Using Favatron as a guide, I will take you through the entire process of creating a fully functional production ready Node web application. Some of the many parts we will touch on include authorization, user accounts, data storage, background workers, security, email, APIs, RSS, third party service integrations, and much more.

I am proud to introduce Twitatron, the web application we will be making. Twitatron will automatically monitor your Twitter account for mentions. When it finds those mentions, it will process them, store them, show them in the UI, expose them via an API endpoint and RSS feed, send an email digest, and share weekly stats with integrated social networks.

No comment yet.
Scoop.it!

Authentication in a Backbone application with node.js on the server

One way to implement authentication/authorization in single page Backbone application, with node.js/express on the server.

Features
  • Authentication in single page
  • Login user
  • Persistent login with cookies
  • Sighnup
  • Logout
  • User roles - public, user, admin
  • Determinig which routes are viewable based on the user's role
  • Basic web forms

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.
Scoop.it!

JWT-Backed Authentication with Ember and Express

JWT-Backed Authentication with Ember and Express | JavaScript for Line of Business Applications | Scoop.it

Our application will be split in two — a front-end web client written with EmberJS, and a JSON API powered by ExpressJS — each within their own self-contained project.

If you want to use JWT in your Ember Apps today there is a new extension by the team behind Blimp (Jose Padilla and Giovanni Colazzo) for the popular Simple Auth Add-on by Simple Labs.

No comment yet.
Scoop.it!

Token based Authentication with Nodejs & Redis

Token based Authentication with Nodejs & Redis | JavaScript for Line of Business Applications | Scoop.it

In order to build our own Token-based Authentication mechanism, we will need a token generator and a redis database to store the token with informations.

We need to generate an unique token when a user sign in. We create a route: POST /user/signin with {username,password} as body parameters. In this route, we check the credentials provided by the client with our user database (MongoDB, MySQL, or whatever database you are using). If the credentials are valid, we generate a token. In order to generate an unique token, we use the Crypto module.

No comment yet.
Scoop.it!

Authentication with AngularJS and a Node.js REST api

Authentication with AngularJS and a Node.js REST api | JavaScript for Line of Business Applications | Scoop.it

The goal of this project is to learn how to build an authentication and authorization mecanism with AngularJS and a RESTful api running on a Node.js server. We can’t use cookies or sessions like an ordinary web application. So, we will use a token mecanism to authenticate our users.

When a user sends his credentials, the Node.js server checks that they are correct and answers with a unique token built with the user informations. The AngularJS application stores the token in the user’ SessionStorage and adds an Authorization header containing the token in every requests made after that. If the endpoint is restricted to authenticated users, the server checks the validity of the token and returns the data if the token is valid or a status code 401 otherwise. In addition to that, the AngularJS application checks if the user is logged in and if he can access the requested route. Otherwise, the user is redirected to the login page.

No comment yet.
Scoop.it!

Handling Oauth2 with Node.js and Angular.js – Passport to the rescue!

Handling Oauth2 with Node.js and Angular.js – Passport to the rescue! | JavaScript for Line of Business Applications | Scoop.it

I’ve recently been working on a small application in AngularJS which will be eventually destined for mobile platforms. Now, I’ve been wanting to get a decent log-in flow for Node happening for a while now; it’s the kind of boilerplate I’m likely to use in a lot of different things. And of course, I want to be able to use the OAuth2 log-in services provided by Facebook, Google et al. A lot of my previous experiments with node and/or angular didn’t require this, and as I try to be prudent with my time it’s always been on the back burner. Until now, that is…

No comment yet.