← Back to list

I gave Asgardeo a try — well, it was a new experience.

I was skeptical. Another “developer-first” auth platform promising to save me hours? Sure. But Asgardeo from WSO2 actually delivered — and…

Amindu Rajamuni · 2026-04-06 08:10 · 5 claps · 3.0 min read
#wso2 #asgardeo #react #authorization #authentication
Open on Medium ↗
Wiki topics: LIT · Literature & Writing 🌐 · Web Development

I gave Asgardeo a try — well, it was a new experience.

I was skeptical. Another “developer-first” auth platform promising to save me hours? Sure. But Asgardeo from WSO2 actually delivered — and I want to tell you exactly how it went.

Let me set the scene

I’ve built auth from scratch before. More than twice. It’s always the same story — you start confident, you end up at 2am reading OAuth 2.0 RFCs and questioning your career choices. So when I heard about Asgardeo, WSO2’s cloud-native identity platform, I was curious but cautious.

I decided to give it a shot — integrate it into a React app, push it a bit, and see if it holds up. Here’s my honest take.

First impressions: the console is actually good

I signed up at asgardeo.io, created an organization, and was greeted by a clean admin console. No overwhelming dropdown menus, no “enterprise software” vibes. I found Applications → New Application within 30 seconds and selected Single Page Application.

It asked me for a redirect URL, I put in http://localhost:3000, and that was it. I had a Client ID in under two minutes. That's a good sign.

“The sign-up to working Client ID flow took me less time than it takes to brew coffee. I timed it.”

The SDK — where it really clicked for me

Here’s what I didn’t expect: the SDK is genuinely well designed. Install it:

npm install @asgardeo/auth-reac

Then wrap your app — and I mean this is seriously all you need:

import { AuthProvider } from "@asgardeo/auth-react";

const config = {
  signInRedirectURL: "http://localhost:3000",
  signOutRedirectURL: "http://localhost:3000",
  clientID: "YOUR_CLIENT_ID",
  baseUrl: "https://api.asgardeo.io/t/YOUR_ORG_NAME",
  scope: ["openid", "profile", "email"],
};

export default function App() {
  return (
    <AuthProvider config={config}>
      <YourApp />
    </AuthProvider>
  );
}

And then in any component:

import { useAuthContext } from "@asgardeo/auth-react";

function HomePage() {
  const { state, signIn, signOut } = useAuthContext();

  if (!state.isAuthenticated) {
    return <button onClick={() => signIn()}>Sign In</button>;
  }

  return (
    <div>
      <p>Welcome, {state.username}!</p>
      <button onClick={() => signOut()}>Sign Out</button>
    </div>
  );
}

I hit run. The redirect worked. The login page appeared. I authenticated. I was back in my app with a valid session. No token handling, no localStorage juggling, no manual PKCE implementation. It just worked.

Calling a protected API — the part I was most worried about:

This is usually where things get messy. Attaching tokens to requests, handling expiry, refreshing silently — I’ve seen this go wrong in production more times than I’d like to admit.

Asgardeo’s SDK has an httpRequest wrapper that handles all of it:

import { useAuthContext } from "@asgardeo/auth-react";

function Dashboard() {
  const { httpRequest } = useAuthContext();

  const fetchData = async () => {
    const response = await httpRequest({
      url: "https://api.yourapp.com/data",
      method: "GET",
    });
    console.log(response.data);
  };

  return <button onClick={fetchData}>Load data</button>;
}

The access token is attached automatically. Silent refresh happens under the hood. I didn’t write a single line of token management code. Coming from rolling this manually — that’s a huge deal.

Social login: which is easy to add

I added Google login because I was curious how painful it would be. In the Asgardeo console: Connections → New Connection → Google. I pasted in my Google OAuth credentials, enabled it on my app, and refreshed.

The “Sign in with Google” button just appeared on the hosted login page. Zero code changes.

What I’d honestly flag as limitations

I mean, it’s not perfect. The hosted login page is customizable but has limits — if you need a deeply custom UI embedded directly in your app, you’ll need to use the SDK’s lower-level APIs rather than the redirect flow. Not a dealbreaker, but worth knowing upfront.

Also, the free tier has organization and user limits. For a side project or internship demo it’s more than enough, but for production scale you’ll want to check their pricing.

So — is it worth it?

Yes. Unambiguously. If you’re building a React app (or really any modern web app) and you need auth, Asgardeo removes the most dangerous, time-consuming parts of the stack. The SDK is clean, the console is intuitive, and the security defaults are actually correct — PKCE enforced by default, no client secrets in the browser. I’ll be using this again.

Give it a try. There is a free tier and the docs are solid!

Official docs at wso2.com/asgardeo/docs.


메타데이터
post_id
245a3da7ee3d
slug
i-gave-asgardeo-a-try-well-it-was-a-new-experience-245a3da7ee3d
url
https://medium.com/@amindurajamuni/i-gave-asgardeo-a-try-well-it-was-a-new-experience-245a3da7ee3d
canonical_url
https://medium.com/@amindurajamuni/i-gave-asgardeo-a-try-well-it-was-a-new-experience-245a3da7ee3d
author_url
https://medium.com/@amindurajamuni
status
ok
fetched_at
2026-07-11 21:25:18