OAuth 2.0 is a widely used standard for secure authorization, but integrating it consistently across multiple languages and frameworks can be challenging.
To solve this, we built kerliix-oauth — a lightweight, open-source library available for both Node.js and Python, designed to make connecting to Kerliix’s OAuth 2.0 system simple and consistent across different environments.
This article introduces the project, its purpose, and how you can start using it today.
Why We Built kerliix-oauth
As Kerliix expands its ecosystem, developers need a simple way to connect their apps to Kerliix’s authentication and authorization services — without having to manually implement token exchange, PKCE, or refresh logic each time.
The goal of kerliix-oauth is to provide:
- A unified OAuth experience across multiple programming languages
- Simplified integration with Kerliix APIs
- Automatic handling of token exchange, refresh, and revocation
- Ease of extension for future SDKs and frameworks
In short, it’s a developer-friendly bridge between your app and Kerliix’s OAuth 2.0 endpoints.
Installation
Both SDKs share the same name — kerliix-oauth — for a consistent developer experience.
For Node.js / TypeScript / JavaScript
Version: v1.0.3
npmjs.com/package/kerliix-oauth
npm install kerliix-oauth
# or
yarn add kerliix-oauth
For Python
Version: v1.0.2
pypi.org/project/kerliix-oauth
pip install kerliix-oauth
Quick Start (Node.js / TypeScript)
import KerliixOAuth from "kerliix-oauth";
const oauth = new KerliixOAuth({
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET", // optional for public clients
redirectUri: "http://localhost:3000/callback",
});
// Step 1: Generate auth URL
const { url, codeVerifier } = await oauth.getAuthUrl(
["openid", "profile", "email"],
"myState",
true // Enable PKCE
);
console.log("Open this URL:", url);
// Step 2: Exchange code for tokens
const tokenResponse = await oauth.exchangeCodeForToken(
"AUTH_CODE_FROM_CALLBACK",
codeVerifier
);
// Step 3: Fetch user info
const user = await oauth.getUserInfo();
console.log("User:", user);
Quick Start (Python)
from kerliix_oauth import KerliixOAuth
oauth = KerliixOAuth(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
redirect_uri="http://localhost:8000/callback"
)
# Step 1: Generate auth URL
auth_url, code_verifier = oauth.get_auth_url(["openid", "profile", "email"], state="myState", pkce=True)
print("Visit this URL:", auth_url)
# Step 2: Exchange code for tokens
token_response = oauth.exchange_code_for_token("AUTH_CODE_FROM_CALLBACK", code_verifier)
# Step 3: Fetch user info
user = oauth.get_user_info()
print("User Info:", user)
Key Features
- OAuth 2.0 + PKCE support
- Token refresh and caching
- Simplified API design for both Node.js and Python
- Same library name and similar usage patterns across languages
- Ready for integration into Kerliix apps or any OAuth 2.0 provider
Project Repositories
| Language | Package | Version | Repository |
|---|---|---|---|
| Node.js / TypeScript | kerliix-oauth |
v1.0.3 | GitHub → kerliix-oauth-nodejs |
| Python | kerliix-oauth |
v1.0.2 | GitHub → kerliix-oauth-python |
What’s Next
kerliix-oauth is part of Kerliix’s broader goal to simplify developer access to its ecosystem.
Upcoming updates will include:
- Support for additional frameworks and SDKs
- Integration examples for Flask, Express, and FastAPI
- Extended token introspection and management utilities
Contribute
We welcome contributors!
Check out the repositories below and open issues or pull requests if you’d like to improve the SDKs.
Conclusion
kerliix-oauth brings a unified, developer-friendly OAuth 2.0 experience to both Node.js and Python.
It’s simple, reliable, and built for developers integrating with Kerliix’s authentication layer or any compatible OAuth provider.
Start building with Kerliix OAuth today — and make secure authentication effortless.
Top comments (0)