Create a new SCAuthManager instance.
Call this once at the module level to create a singleton — the PKCE store is shared across requests within the same process (or across instances if you supply an external store).
// lib/sc-auth.tsimport { createSCAuthManager } from "soundcloud-api-ts-next/server";export const scAuth = createSCAuthManager({ clientId: process.env.SC_CLIENT_ID!, clientSecret: process.env.SC_CLIENT_SECRET!, redirectUri: process.env.SC_REDIRECT_URI!,}); Copy
// lib/sc-auth.tsimport { createSCAuthManager } from "soundcloud-api-ts-next/server";export const scAuth = createSCAuthManager({ clientId: process.env.SC_CLIENT_ID!, clientSecret: process.env.SC_CLIENT_SECRET!, redirectUri: process.env.SC_REDIRECT_URI!,});
Create a new SCAuthManager instance.
Call this once at the module level to create a singleton — the PKCE store is shared across requests within the same process (or across instances if you supply an external store).