Not too long ago I wrote about authenticating within a Node.js API using Json Web Tokens (JWT). The basis of the example is around authenticating via a username and password and receiving a JWT for every future request against the API. While that example is incredibly useful and follows best practice, it doesn’t cover the scenario where you’d like to have a two-factor authentication (2FA) option for your users. In case you’re unfamiliar, 2FA is a second layer of protection for accounts made possible by a time-based token generated by a shared secret key.
We’re going to see how to add a two-factor authentication option to our Node.js API while continuing to use Json Web Tokens.
Read MoreWhen building a mobile application, there are often scenarios where you need to storage files remotely and when I say files, I don’t mean database data. For example, maybe you want to develop an image manager or photo storage solution like what Facebook and Instagram offer? There are many solutions, for example you could store the files in your database as binary data, or you could store the files on the same server as your web application. However, there are better options, for example, you could use an object storage solution to store files uploaded from your mobile application. Popular object storage solutions include AWS S3 as well as the open source alternative Minio.
We’re going to see how to leverage Minio to store images that have been uploaded from an Android and iOS mobile application built with NativeScript and Angular.
Read MoreWhen I’m developing with Angular, I often find myself needing to loop over an object via HTML markup. In AngularJS one could loop over object properties or arrays, but in Angular you can only loop over arrays by default. This is easily fixable through what are known as Angular Pipes.
With pipes you can create display-value transformations for pretty much anything, or in my case transform an object into an array and loop over it. We’re going to see how to create a pipe that will allow us to loop over an object in the HTML layer.
Read MoreOver the past few weeks I’ve been doing a lot of investigation into JSON Web Tokens (JWT) for authentication in APIs. If you’ve been keeping up, you’ll remember I wrote about JWT authentication in a Node.js application as well as building a client facing NativeScript and Angular mobile application that made use of the Node.js backend. This is great, but what if you’re not very fond of JavaScript development?
We’re going to see how to create a backend API that creates and validates JSON Web Tokens using the Go programming language. This teach us how to create an API that offers an authentication mechanism outside of sessions and cookies, which typically are not available when working with an API.
Read MoreI am pleased to announce that the latest episode of The Polyglot Developer Podcast has been published to all the popular podcasting networks which include, but are not limited to, iTunes and Pocket Casts. In this episode titled, The Go Programming Language and Where it Fits in Modern Development, I am joined by Go advocate, Matt Holt, where we discuss Go as an option to modern development.
In this episode we discuss where Go excels and how it compares to other popular development technologies such as PHP and Node.js.
Read MoreWhen building a web application, not only do you need amazing features, but you also need a stunning user experience and that can often be managed by making good use of UI components. When I’m using my favorite web applications, the way components are displayed on the screen are sometimes what makes the application so memorable. Designers will often animate components to make them stand out.
When building a web application you can use CSS keyframe animations, but if you’re using Angular, there is another way. We’re going to see how to use the Angular Animations component to animate UI components on the screen.
Read MoreI’ve been working with Docker for a while now and I’ve found that I’m rarely using one of the vanilla images found on Docker Hub. By rarely, I don’t mean never, but in most cases I find that I’m building my own custom Docker image for any web application that I wish to containerize. This allows me to create an image that meets my needs and deploy it anywhere and anytime that I find necessary.
We’re going to see how to build a simple web application and turn it into a Docker image so it is containerized and easily deployable anywhere that Docker Engine is available.
Read More