StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Stackups
  2. Utilities
  3. Authentication
  4. User Management And Authentication
  5. JSON Web Token vs Keycloak

JSON Web Token vs Keycloak

OverviewDecisionsComparisonAlternatives

Overview

Keycloak
Keycloak
Stacks783
Followers1.3K
Votes102
JSON Web Token
JSON Web Token
Stacks1.8K
Followers367
Votes0
GitHub Stars3.7K
Forks374

JSON Web Token vs Keycloak: What are the differences?

Both JWT and Keycloak are technologies used in web development for authentication and authorization purposes. Let's explore the key differences between them.

  1. Scalability: One key difference between JWT and Keycloak lies in their scalability. JWT is a lightweight and stateless authentication protocol that can be easily implemented and used with different programming languages and frameworks. It is suitable for small to medium-sized applications where scalability is not a major concern. On the other hand, Keycloak is a more robust and feature-rich identity and access management system that provides centralized authentication and authorization services. It offers features like user management, single sign-on, and social login integration, making it suitable for large-scale applications with complex security requirements.

  2. Token Generation and Authentication: JWT is a token-based authentication protocol where a JSON-encoded token is generated by the server and sent to the client. The client includes this token in subsequent requests to authenticate itself with the server. The server verifies the token's integrity by checking its digital signature, ensuring that it has not been tampered with. Keycloak, on the other hand, uses a session-based authentication approach. When a user logs in, Keycloak generates a session cookie that is stored on the client-side. This cookie is sent along with every request to the server, allowing Keycloak to authenticate the user based on the session information stored on the server.

  3. User Management: Keycloak offers comprehensive user management capabilities, allowing administrators to create, manage, and authenticate users. It provides features like user registration, password reset, and user role management out of the box. JWT, on the other hand, does not provide built-in user management functionality. It is primarily a mechanism for securely transmitting authentication and authorization data between parties. User management needs to be implemented separately when using JWT.

  4. Integration and Compatibility: JWT is a standard-based protocol and can be easily integrated into existing applications and systems. It is widely supported by various programming languages and frameworks, making it a popular choice for cross-platform development. Keycloak, while also compatible with standard protocols like OpenID Connect and SAML, requires additional setup and configuration to integrate with existing applications. It provides its own user interface and APIs for managing authentication and authorization, which may require more effort to integrate into existing systems.

  5. Security Features: Keycloak provides additional security features like two-factor authentication, brute-force protection, and fine-grained access control policies. It allows administrators to define complex security rules based on user roles, groups, and attributes. JWT, being a lightweight protocol, does not provide these advanced security features natively. Security measures like two-factor authentication and access control policies need to be implemented separately in the application when using JWT.

  6. Deployment Options: Keycloak can be deployed as a stand-alone identity server or integrated into existing applications as a library. It provides options for high availability and clustering to ensure scalability and fault tolerance. JWT, on the other hand, can be easily integrated into any application or service that supports the JSON format. It does not require any specific deployment options and can be used with different architectures, including microservices and serverless environments.

In summary, JWT offers a lightweight and decentralized approach to authentication, suitable for scenarios where simplicity and scalability are priorities, while Keycloak provides a comprehensive IAM solution with features like user federation, role-based access control, and social login integration, ideal for applications requiring robust identity management capabilities.

Share your Stack

Help developers discover the tools you use. Get visibility for your team's tech choices and contribute to the community's knowledge.

View Docs
CLI (Node.js)
or
Manual

Advice on Keycloak, JSON Web Token

sindhujasrivastava
sindhujasrivastava

Jan 16, 2020

Needs advice

I am working on building a platform in my company that will provide a single sign on to all of the internal products to the customer. To do that we need to build an Authorisation server to comply with the OIDC protocol. Earlier we had built the Auth server using the Spring Security OAuth project but since in Spring Security 5.x it is no longer supported we are planning to get over with it as well. Below are the 2 options that I was considering to replace the Spring Auth Server.

  1. Keycloak
  2. Okta
  3. Auth0 Please advise which one to use.
258k views258k
Comments

Detailed Comparison

Keycloak
Keycloak
JSON Web Token
JSON Web Token

It is an Open Source Identity and Access Management For Modern Applications and Services. It adds authentication to applications and secure services with minimum fuss. No need to deal with storing users or authenticating users. It's all available out of the box.

JSON Web Token is an open standard that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. This information can be verified and trusted because it is digitally signed.

-
compact;self-contained
Statistics
GitHub Stars
-
GitHub Stars
3.7K
GitHub Forks
-
GitHub Forks
374
Stacks
783
Stacks
1.8K
Followers
1.3K
Followers
367
Votes
102
Votes
0
Pros & Cons
Pros
  • 33
    It's a open source solution
  • 24
    Supports multiple identity provider
  • 17
    OpenID and SAML support
  • 12
    Easy customisation
  • 10
    JSON web token
Cons
  • 7
    Okta
  • 6
    Poor client side documentation
  • 5
    Lack of Code examples for client side
No community feedback yet

What are some alternatives to Keycloak, JSON Web Token?

Auth0

Auth0

A set of unified APIs and tools that instantly enables Single Sign On and user management to all your applications.

Stormpath

Stormpath

Stormpath is an authentication and user management service that helps development teams quickly and securely build web and mobile applications and services.

Devise

Devise

Devise is a flexible authentication solution for Rails based on Warden

Firebase Authentication

Firebase Authentication

It provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app. It supports authentication using passwords, phone numbers, popular federated identity providers like Google,

Amazon Cognito

Amazon Cognito

You can create unique identities for your users through a number of public login providers (Amazon, Facebook, and Google) and also support unauthenticated guests. You can save app data locally on users’ devices allowing your applications to work even when the devices are offline.

WorkOS

WorkOS

Start selling to enterprise customers with just a few lines of code.

OAuth.io

OAuth.io

OAuth is a protocol that aimed to provide a single secure recipe to manage authorizations. It is now used by almost every web application. However, 30+ different implementations coexist. OAuth.io fixes this massive problem by acting as a universal adapter, thanks to a robust API. With OAuth.io integrating OAuth takes minutes instead of hours or days.

OmniAuth

OmniAuth

OmniAuth is a Ruby authentication framework aimed to abstract away the difficulties of working with various types of authentication providers. It is meant to be hooked up to just about any system, from social networks to enterprise systems to simple username and password authentication.

ORY Hydra

ORY Hydra

It is a self-managed server that secures access to your applications and APIs with OAuth 2.0 and OpenID Connect. It is OpenID Connect Certified and optimized for latency, high throughput, and low resource consumption.

Kinde

Kinde

Simple, powerful authentication that you can integrate in minutes. Free your users from passwords with secure and frictionless one click sign up and sign in. Built from the ground up using the best in class security protocols available today.

Related Comparisons

Postman
Swagger UI

Postman vs Swagger UI

Mapbox
Google Maps

Google Maps vs Mapbox

Mapbox
Leaflet

Leaflet vs Mapbox vs OpenLayers

Twilio SendGrid
Mailgun

Mailgun vs Mandrill vs SendGrid

Runscope
Postman

Paw vs Postman vs Runscope