azure-auth
Microsoft Entra ID (Azure AD) authentication for React SPAs with MSAL.js and Cloudflare Workers JWT validation using jose library. Full-stack pattern with Authorization Code Flow + PKCE. Prevents 8 documented errors. Use when: implementing Microsoft SSO, troubleshooting AADSTS50058 loops, AADSTS700084 refresh token errors, React Router redirects, setActiveAccount re-render issues, or validating Entra ID tokens in Workers.
Why use this skill?
Implement secure Microsoft Entra ID authentication in React SPAs and validate JWTs in Cloudflare Workers using this comprehensive MSAL.js and jose integration guide.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/veeramanikandanr48/azure-authWhat This Skill Does
The azure-auth skill provides a robust architectural framework for implementing Microsoft Entra ID (formerly Azure AD) authentication in modern full-stack JavaScript environments. It bridges the gap between client-side React SPAs using the Microsoft Authentication Library (MSAL.js) and backend serverless environments like Cloudflare Workers. By leveraging the industry-standard Authorization Code Flow with Proof Key for Code Exchange (PKCE), this skill ensures that authentication tokens are handled securely without exposing sensitive secrets on the frontend. The skill includes pre-configured patterns for token acquisition, silent SSO, and edge-side JWT validation using the jose library, specifically optimized to avoid common pitfalls such as MSAL re-render loops and cross-browser cookie restrictions.
Installation
To integrate this skill into your project, run the following command in your terminal:
clawhub install openclaw/skills/skills/veeramanikandanr48/azure-auth
After installation, ensure you have the required peer dependencies installed in your project: @azure/[email protected], @azure/[email protected], and [email protected]. Verify your environment variables are set for your Application Client ID and Directory Tenant ID as outlined in the configuration setup.
Use Cases
- Implementing Microsoft SSO for internal business tools or SaaS applications.
- Troubleshooting and resolving common authentication errors like AADSTS50058 (silent authentication failures) and AADSTS700084 (refresh token expiry).
- Securing Cloudflare Worker API endpoints by verifying JWT tokens issued by Microsoft Entra ID at the edge.
- Managing React Router navigation guards to ensure unauthenticated users are redirected appropriately to login screens without disrupting the user experience.
- Resolving complex re-render issues in React caused by multiple
setActiveAccountcalls in the MSAL provider.
Example Prompts
- "Help me configure MSAL.js in my React app to prevent the AADSTS50058 silent auth loop during page refreshes."
- "Write a Cloudflare Worker snippet using the jose library to validate the Bearer token received from an Entra ID authentication request."
- "My React SPA is failing to store authentication state in Safari; how should I configure the msal-config cache settings to handle third-party cookie restrictions?"
Tips & Limitations
Note that MSAL.js is designed exclusively for browser environments and will not function within a Cloudflare Worker; always use the lightweight jose library for token validation in serverless runtimes. Always enable storeAuthStateInCookie: true to prevent issues in browsers with strict privacy settings like Safari and Edge. Remember to keep your scopes consistent between the loginRequest and apiRequest configurations to avoid token validation failures at the API layer. Ensure your Azure Portal redirect URIs match your local development and production URLs exactly to avoid callback errors.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-veeramanikandanr48-azure-auth": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: external-api, code-execution
Related Skills
earnings-calendar
This skill retrieves upcoming earnings announcements for US stocks using the Financial Modeling Prep (FMP) API. Use this when the user requests earnings calendar data, wants to know which companies are reporting earnings in the upcoming week, or needs a weekly earnings review. The skill focuses on mid-cap and above companies (over $2B market cap) that have significant market impact, organizing the data by date and timing in a clean markdown table format. Supports multiple environments (CLI, Desktop, Web) with flexible API key management.
better-auth
Self-hosted auth for TypeScript/Cloudflare Workers with social auth, 2FA, passkeys, organizations, RBAC, and 15+ plugins. Requires Drizzle ORM or Kysely for D1 (no direct adapter). Self-hosted alternative to Clerk/Auth.js. Use when: self-hosting auth on D1, building OAuth provider, multi-tenant SaaS, or troubleshooting D1 adapter errors, session caching, rate limits, Expo crashes, additionalFields bugs.
dividend-growth-pullback-screener
Use this skill to find high-quality dividend growth stocks (12%+ annual dividend growth, 1.5%+ yield) that are experiencing temporary pullbacks, identified by RSI oversold conditions (RSI ≤40). This skill combines fundamental dividend analysis with technical timing indicators to identify buying opportunities in strong dividend growers during short-term weakness.
cli-developer
Use when building CLI tools, implementing argument parsing, or adding interactive prompts. Invoke for CLI design, argument parsing, interactive prompts, progress indicators, shell completions.
options-strategy-advisor
Options trading strategy analysis and simulation tool. Provides theoretical pricing using Black-Scholes model, Greeks calculation, strategy P/L simulation, and risk management guidance. Use when user requests options strategy analysis, covered calls, protective puts, spreads, iron condors, earnings plays, or options risk management. Includes volatility analysis, position sizing, and earnings-based strategy recommendations. Educational focus with practical trade simulation.