Attributes
Includes Deno configuration
Repository
Current version released
a month ago
Versions
- v0.0.106-eac-cascadeLatest
- v0.0.105-eac-cascade
- v0.0.104-eac-cascade
- v0.0.103-eac-cascade
- v0.0.102-eac-cascade
- v0.0.101-eac-cascade
- v0.0.100-eac-cascade
- v0.0.99-eac-cascade
- v0.0.98-eac-cascade
- v0.0.97-eac-cascade
- v0.0.96-eac-cascade
- v0.0.95-eac-cascade
- v0.0.94-eac-cascade
- v0.0.93-eac-cascade
- v0.0.92-eac-cascade
- v0.0.91-eac-cascade
- v0.0.90-eac-cascade
- v0.0.89-eac-cascade
- v0.0.88-eac-cascade
- v0.0.87-eac-cascade
- v0.0.86-eac-cascade
- v0.0.85-eac-cascade
- v0.0.84-eac-cascade
- v0.0.83-integration
- v0.0.81-integration
- v0.0.80-integration
- v0.0.79-integration
- v0.0.78-integration
- v0.0.77-integration
- v0.0.73-integration
- v0.0.72-integration
- v0.0.71-integration
- v0.0.70-integration
- v0.0.69-integration
- v0.0.68-integration
- v0.0.66-integration
- v0.0.65-integration
- v0.0.64-integration
- v0.0.63-integration
- v0.0.62-integration
- v0.0.61-integration
- v0.0.60-integration
- v0.0.59
- v0.0.59-integration
- v0.0.58
- v0.0.58-integration
- v0.0.57
- v0.0.57-integration
- v0.0.56
- v0.0.56-integration
- v0.0.55-integration
- v0.0.54-integration
- v0.0.54
- v0.0.53
- v0.0.53-integration
- v0.0.52
- v0.0.52-integration
- v0.0.51
- v0.0.51-integration
- v0.0.50
- v0.0.50-integration
- v0.0.49
- v0.0.49-integration
- v0.0.48
- v0.0.48-integration
- v0.0.47
- v0.0.47-integration
- v0.0.46
- v0.0.46-integration
- v0.0.45
- v0.0.45-integration
- v0.0.44
- v0.0.44-integration
- v0.0.43-integration
- v0.0.43
- v0.0.42
- v0.0.42-integration
- v0.0.41
- v0.0.41-integration
- v0.0.40
- v0.0.40-integration
- v0.0.39
- v0.0.39-integration
- v0.0.38
- v0.0.38-integration
- v0.0.37
- v0.0.37-integration
- v0.0.36
- v0.0.36-integration
- v0.0.35
- v0.0.35-integration
- v0.0.34
- v0.0.34-integration
- v0.0.33
- v0.0.33-integration
- v0.0.31
- v0.0.31-integration
- v0.0.30
- v0.0.30-integration
- v0.0.29
- v0.0.28
- v0.0.28-integration
- v0.0.27-integration
- v0.0.26
- v0.0.26-integration
- v0.0.25-integration
- v0.0.24
- v0.0.24-integration
- v0.0.23
- v0.0.23-integration
FrontmatterVersion: 1 DocumentType: Guide Title: Fathym MSAL for Deno Summary: Deno wrapper for the Microsoft Authentication Library (MSAL) built on msal-node. Created: 2025-11-20 Updated: 2025-11-20 Owners: - fathym References: - Label: Projects: Ref-Arch README Path: ../README.md - Label: Projects: Ref-Arch AGENTS Path: ../AGENTS.md - Label: Projects: Ref-Arch Guide Path: ../GUIDE.md - Label: Root README Path: ../../../README.md - Label: Root Agents Guide Path: ../../../AGENTS.md - Label: Root Workspace Guide Path: ../../../WORKSPACE_GUIDE.md - Label: Project Agents Guide Path: ./AGENTS.md - Label: Project Guide Path: ./GUIDE.md
Fathym MSAL for Deno
Deno-focused implementation of the Microsoft Authentication Library, leveraging msal-node to enable Azure AD auth flows for Deno runtimes (including Fresh).
- Goal: provide a reliable MSAL wrapper with clear examples for Deno apps and micro frontends.
- Outputs: library code, usage docs, and packaging for Deno/npm as required.
- Code location: this folder currently hosts the source; link external repos if the implementation moves.
Current Status
- Based on the Microsoft tutorial for MSAL Node; see msal-tutorial for the upstream guide.
- Tasks available:
deno task test,deno task build,deno task deploy,deno task publish:check,deno task npm:build/publish. - Packaging and version pins not yet captured in
UPSTREAM.md.
Getting Started with MSAL in Deno Fresh
To get started with MSAL for Deno, add the following to your deno.json configuration file (JSR + npm preferred):
{
"imports": {
"@fathym/msal": "jsr:@fathym/msal@0.0.88-eac-cascade",
"$fresh/session": "https://deno.land/x/fresh_session@${VERSION}/mod.ts",
"preact": "npm:preact@${VERSION}",
"preact/": "npm:preact@${VERSION}/",
"preact-render-to-string": "npm:preact-render-to-string@${VERSION}"
}
}Configure MSAL in a new msal.config.ts file (Fresh example):
import * as msal from "npm:@azure/msal-node@2.1.0";
import { Configuration } from "npm:@azure/msal-node@2.1.0";
import { MSALAuthProvider, MSALPluginConfiguration } from "@fathym/msal";
import { denoKv } from "./deno-kv.config.ts";
export const msalCryptoProvider = new msal.CryptoProvider();
export const msalConfig: Configuration = {
auth: {
clientId: Deno.env.get("AZURE_CLIENT_ID")!,
authority: `https://login.microsoftonline.com/${
Deno.env.get("AZURE_TENANT_ID")
}`,
clientSecret: Deno.env.get("AZURE_CLIENT_SECRET")!,
},
system: {
loggerOptions: {
loggerCallback(...args: unknown[]) {
console.log(...args);
},
logLevel: msal.LogLevel.Verbose,
piiLoggingEnabled: false,
},
},
};
export const msalPluginConfig: MSALPluginConfiguration = {
cachePluginConfig: {
cachePlugin: denoKv(
Deno.env.get("MSAL_CACHE_CONNECTION_STRING")!,
),
},
kv: {
provision: true,
},
NodeCacheManager: msal.NodeStorage,
};The upstream Microsoft tutorial explains how to sign in users and acquire tokens for Microsoft Graph. This implementation aims to provide the same functionality for Deno. Deno Fresh examples above apply; using this with other frameworks is possible—pull requests are welcome to expand the documentation.
How to Work in This Pod
- Review the root and portfolio Instruction Documents plus this project’s
AGENTSandGUIDE. - Declare intent before editing; summarize outcomes and open questions in this README or a short log.
- Capture provenance, release channels, and packaging details in
UPSTREAM.md; keep npm/deno references in sync. - Keep links relative; reference implementation repos/branches when selected.
- Record prompts/scripts used when designing auth flows or automations.