---
title: "openvibe-sdk/auth/browser · OpenVibe.Services"
canonical: "https://openvibe.services/docs/sdk/auth-browser"
updated: null
---

# openvibe-sdk/auth/browser · OpenVibe.Services

HTML: [openvibe-sdk/auth/browser · OpenVibe.Services](https://openvibe.services/docs/sdk/auth-browser)

# `openvibe-sdk/auth/browser`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

From `types/auth-browser.d.ts` (both). Declarations are shown verbatim.

## function createPkcePair

~~~~
export declare function createPkcePair(length?: number): Promise<{ codeVerifier: string; codeChallenge: string; codeChallengeMethod: 'S256' }>;
~~~~

## function createState

~~~~
export declare function createState(): string;
~~~~

## interface AuthorizeOptions

~~~~
export interface AuthorizeOptions {
    network?: string;
    authorizeUrl?: string;
    clientId: string;
    redirectUri: string;
    /** Default 'profile theme' only when no audience is given. Developer apps: capability ids. */
    scope?: string | string[];
    /** Developer apps: the audience (openvibe.<service>) the code is for; exchange with the same one. */
    audience?: string;
    state?: string;
    codeChallenge?: string;
    codeChallengeMethod?: 'S256';
    /** 'none' = silent SSO; the callback carries error=login_required when there is no session. Refused for developer apps (interaction_required). */
    prompt?: 'none';
}
~~~~

## function buildAuthorizeUrl

~~~~
export declare function buildAuthorizeUrl(opts: AuthorizeOptions): string;
~~~~

## function startAuthorization

~~~~
export declare function startAuthorization(opts: Omit<AuthorizeOptions, 'codeChallenge' | 'codeChallengeMethod'> & { verifierLength?: number }): Promise<{ url: string; state: string; codeVerifier: string; codeChallenge: string }>;
~~~~

## function readCallback

~~~~
export declare function readCallback(location: string | URL, opts?: { expectedState?: string }): { code: string; state: string };
~~~~

## function base64url

~~~~
export declare function base64url(bytes: Uint8Array): string;
~~~~

## function decodeUnverified

Header and claims of a JWT decoded WITHOUT verification (display and diagnostics only), or null.

~~~~
export declare function decodeUnverified(token: string): { header: Record<string, unknown>; claims: Record<string, any> } | null;
~~~~

## function unverifiedClaims

The claims of a JWT decoded WITHOUT verification, or null. Never authorize with them.

~~~~
export declare function unverifiedClaims(token: string): Record<string, any> | null;
~~~~
