
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@fractalshq/auth-react
Advanced tools
Adapter-agnostic React helpers for cookie-based SIWS auth. No tokens in localStorage; session lives in HTTP-only cookies.
Adapter-agnostic React helpers for cookie-based SIWS auth. No tokens in localStorage; session lives in HTTP-only cookies.
import { AuthProvider, useAuth } from "@fractalshq/auth-react";
export default function App() {
return (
<AuthProvider baseURL="/api">
<Login />
</AuthProvider>
);
}
function Login() {
const { user, status, loginWithWallet, logout } = useAuth();
const connect = async () => {
const publicKey = await getPubkey();
const sign = (m: string) => wallet.signMessage(m);
await loginWithWallet({ publicKey, sign, provider: "phantom" });
};
return (
<div>
{status !== "authenticated" ? (
<button onClick={connect}>Sign in</button>
) : (
<>
<pre>{JSON.stringify(user, null, 2)}</pre>
<button onClick={logout}>Sign out</button>
</>
)}
</div>
);
}
import { useActiveOrg, useHasOrgRole, useHasPlatformRole, FRACTALS_PLATFORM_ID } from "@fractalshq/auth-react";
const { id: activeOrgId, role } = useActiveOrg();
const canManageOrg = useHasOrgRole(activeOrgId!, ["admin", "distributor"]);
const isPlatformAdmin = useHasPlatformRole(FRACTALS_PLATFORM_ID, ["admin"]);
import { createClient } from "@fractalshq/auth-react";
const client = createClient({ baseURL: "/api" });
const { message } = await client.createNonce(pubkey);
const sig = await sign(message);
await client.signInSiws({ publicKey: pubkey, signature: sig, message });
const me = await client.getMe();
Ledger devices are supported via transaction-based authentication that works with hardware wallets. We never access private keys; users must verify transactions on-device.
@solana/web3.js installed (see Web3 Adapter Setup below)# Required for web3 operations
npm install @solana/web3.js
# Choose one Ledger integration:
# Option A — Ledger Wallet API Client (via Ledger Live / Connect Kit):
npm install @ledgerhq/wallet-api-client @ledgerhq/connect-kit-loader
# Option B — Direct device transport (advanced):
npm install @ledgerhq/hw-transport-webhid @ledgerhq/hw-app-solana
Ledger authentication requires a web3 adapter. Add this to your app's providers:
import { Transaction, PublicKey, TransactionInstruction, SystemProgram } from '@solana/web3.js';
import { AuthProvider, Web3Adapter } from '@fractalshq/auth-react';
const web3Adapter: Web3Adapter = {
Transaction,
PublicKey,
TransactionInstruction,
SystemProgram,
};
export default function App() {
return (
<AuthProvider baseURL="/api" web3Adapter={web3Adapter}>
{/* Your app */}
</AuthProvider>
);
}
See Ledger docs for setup and security notes: https://developers.ledger.com.
import { AuthProvider, useAuth } from "@fractalshq/auth-react";
import { Connection } from "@solana/web3.js";
export default function App() {
return (
<AuthProvider baseURL="/api" web3Adapter={web3Adapter}>
<LedgerLogin />
</AuthProvider>
);
}
function LedgerLogin() {
const { loginWithLedger } = useAuth();
const connectLedger = async () => {
// Implement using your chosen Ledger integration:
const signer = await getLedgerSolanaSigner(); // Returns a WalletSigner
const connection = new Connection("https://api.mainnet-beta.solana.com");
await loginWithLedger({
signer,
connection,
provider: "ledger"
});
};
return <button onClick={connectLedger}>Sign in with Ledger</button>;
}
The getLedgerSolanaSigner() should encapsulate your chosen Ledger integration. For example:
{ publicKey, sign }.@ledgerhq/hw-transport-webhid + @ledgerhq/hw-app-solana to derive { publicKey, sign }.import { createClient } from "@fractalshq/auth-react";
import { Connection } from "@solana/web3.js";
const client = createClient({
baseURL: "/api",
web3Adapter: { Transaction, PublicKey, TransactionInstruction, SystemProgram }
});
const signer = await getLedgerSolanaSigner(); // Returns a WalletSigner
const connection = new Connection("https://api.mainnet-beta.solana.com");
await client.loginWithLedgerSigner({
signer,
connection,
provider: "ledger"
});
FAQs
Adapter-agnostic React helpers for cookie-based SIWS auth. No tokens in localStorage; session lives in HTTP-only cookies.
The npm package @fractalshq/auth-react receives a total of 29 weekly downloads. As such, @fractalshq/auth-react popularity was classified as not popular.
We found that @fractalshq/auth-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.