background preloader

Token-Based Authentication With AngularJS & NodeJS

Token-Based Authentication With AngularJS & NodeJS

auth0/node-jsonwebtoken Manual de AngularJS Listado de los capítulos Introducción a AngularJS Esta es una introducción de manera conceptual al framework Javascript AngularJS. Explicamos por qué cada vez tiene más importancia el desarrollo de aplicaciones web con alta carga de Javascript y por qué son esenciales este tipo de librerías para una programación más sencilla, rápida y de fácil mantenimiento. Completaremos la introducción con una práctica en la que podremos experimentar con un primer ejemplo en Angular. 1.- Por qué AngularJS Cómo los frameworks Javascript en general y AngularJS en concreto nos sirven para solucionar las necesidades actuales de la informática, en cuanto a desarrollo multiplataforma de aplicaciones grandes o enormes que se asemejan a las de escritorio. 2.- Qué es AngularJS Descripción general sobre AngularJS, el framework Javascript, así como los principales componentes que tiene y los conceptos que debemos conocer antes de poner manos en el código. 3.- AngularJS Vs jQuery ¿Complementarias? Descargas Comentarios

Token-based Authentication with Socket.IO Introduction Authentication in realtime frameworks can be challenging. Perhaps this is because the way these systems work is quite different from a regular web app. This first diagram shows this common misconception: It is a common misconception that a user who is authenticated in the hosting web appliction, is also authenticated in the socket stream. Cookie-based and Token-based Auth There are two ways of solving this problem: the traditional cookie-based approach or a token-based approach. In our previous article, we wrote about the benefits of a token-based architecture: Cookies vs Tokens. Coupling: the first issue when using cookies is that you have to couple the web application authentication mechanism with the socket server authentication. Authenticating Sockets using Tokens By now you should not be surprised if we proposed a different alternative to cookies: using tokens. Server Side Code speaks by itself. Then the socket.io server Client Side

CSS > Typography Angular Material provides typography CSS classes you can use to create visual consistency across your application. Reference the Material Design specification for Typography. To preserve semantic structures, you should style the <h1>- <h6>heading tags with the styling classes shown below: Selectors Output .md-display-4 Light 112px .md-display-3 Regular 56px .md-display-2 Regular 45px .md-display-1 Regular 34px .md-headline Regular 24px .md-title Medium 2.0sp .md-subhead Regular 16px Example Note: Base font size is 10px for easy rem units (1.2rem = 12px).

WebSocket Security security websockets Table of Contents The WebSocket protocol is a young technology, and brings with it some risks. Decades of experience have taught the web community some best practices around HTTP security, but the security best practices in the WebSocket world aren’t firmly established, and continue to evolve. You should strongly prefer the secure protocol over the insecure transport. Heroku’s SSL endpoints support WSS, and we strongly recommend that you use it. Avoid tunneling It’s relatively easy to tunnel arbitrary TCP services through a WebSocket. We recommend avoiding tunneling if at all possible. Validate client input WebSocket connections are easily established outside of a browser, so you should assume that you need to deal with arbitrary data. Validate server data You should apply equal suspicion to data returned from the server, as well. Authentication/authorization The WebSocket protocol doesn’t handle authorization or authentication.

Related: