Session Cookie Authentication in Node.js (With Complete Examples)

In this post, we will learn how to authenticate users using session cookies in a Node.js server application. When a user logs into our application, we need to know who they are across all our HTTP methods and routes. One way to do this is to store the users “session”. A session is started once a user logs in, and expires some time after that. Each logged in user has some reference to the session (called a cookie), which they send with their requests....

 · Soham Kamani

Creating an OAuth2 Client in Golang (With Full Examples)

In this post we will see how we can implement OAuth2 authentication in a Go web application. We will create a working website that can allow a user to sign in using Github authentication. If you just want to see the code, you can view the full example on Github How OAuth2 Works Let’s take a brief look at the OAuth protocol before we jump into implementation. If you’ve ever seen a dialog like this, then you’ve probably used OAuth before:...

Last Updated:   · Soham Kamani

Implementing OAuth 2.0 with Node.js

OAuth2 is an authentication protocol that is used to authenticate and authorize users in an application by using another service provider. This post will go through how to build a Node.js application to implement the OAuth2 protocol. If you just want to see the code, you can view it on Github How OAuth2 Works Let’s take a brief look at the OAuth protocol before we jump into implementation. If you’ve ever seen a dialog like this, then you’ve probably used OAuth before:...

Last Updated:   · Soham Kamani

Session Cookie Authentication in Golang (With Complete Examples)

In this post, we will learn how to authenticate users using session cookies in a Golang server application. When a user logs into our application, we need to know who they are across all our HTTP methods and routes. One way to do this is to store the users “session”. A session is started once a user logs in, and expires some time after that. Each logged in user has some reference to the session (called a cookie), which they send with their requests....

Last Updated:   · Soham Kamani