There are several authentication services out there such as Firebase Authentication, Auth0, etc. In sum project, you might need more control over your authorization and user management with advanced features.

That’s where Keycloak is an excellent choice, It provides lots of features out of the box. Keycloak has built-in support for OpenID Connect and SAML 2.0 as well as a number of social networks such as Google, GitHub, Facebook, and Twitter.

I wanted to write this because I couldn't find good examples when I’m doing this implementation to restrict react routes/components/function with keycloak with minimal 3rd party libraries.

In this short guide, we will walk through the following steps

  • Install Keycloack…


When I decide to write my own vanilla js library and the next thing that pops into my mind is how do I bundle up this library.
What I did was just go through some of the libraries that I used in day-to-day life. I noticed that most libraries bundle up with Rollup and few of them bundle up with Webpack. Then I read a few articles to compare Rollup vs Webpack. Most of the article quoted that.

Rollup for Libraries & Webpack for Application

The Parcel is out of my consideration since libraries which I used day-to-day not…

Before you publish npm library to nexus or npm registry you can try it out locally.
Hope you already know how to link your library with your project locally and do the development. However, if you don’t know, please follow the below two steps to test your library locally linked with your app without installing it from a remote registry.

// step 1: To publish library locally & use it in applcation
cd path-to-your-library/
npm run build

npm link
// step 2: To install npm library which is pulished in locallycd path-to-your-applicaiton/your-applicaiton
npm link secure-react-keycloak
npm run start

Let’s jump into the publishing part


I would say this article is a summary of REST API Design Rulebook By Mark Masse

What is REST

  • REST stands for REpresentational State Transfer.
  • REST was first introduced by Roy Fielding in the year 2000.
    (He is known for REST and Apache, contributes URI, HTTP, and HTML)
  • REST uses HTTP protocol for data communication.
  • REST uses Text, JSON and XML to communicate with client and server.

But best restful design even don’t need superfluous documentation, because of HATEOAS, we will get to HATEOAS at the end.

RESTful Web Services are basically REST Architecture based Web Services.

Chanuka Asanka

Full Stack Developer | JavaScript Enthusiastic | Open Source Contributor

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store