soundcloud-api-ts-next
    Preparing search index...

    Interface SCLoginOptions

    interface SCLoginOptions {
        sessionId?: string;
    }
    Index

    Properties

    Properties

    sessionId?: string

    Optional session identifier to incorporate into the OAuth state string.

    When provided, the state becomes <sessionId>:<random-uuid>, preventing parallel login flows from different browser tabs or user-agents from overwriting each other's PKCE state.

    // Scope login to the current user session
    const sessionId = req.cookies["session_id"];
    const { url, state } = await scAuth.initLogin({ sessionId });