Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.discovr.media/llms.txt

Use this file to discover all available pages before exploring further.

Redirects the current page to the authentication server. The user signs in and is redirected back to your callback URL. Call handleRedirectResult() on the return page to complete sign-in.

Parameters

NameTypeRequiredDescription
redirectURLstringYesThe callback URL registered for this client ID. Must match server configuration.

Returns

void — This method navigates away (redirects the page). Call handleRedirectResult() on the return page.

Example

const client = new DiscovrClient("your-client-id");
client.signInWithWebAuth(window.location.origin + "/auth-callback");
// Page redirects. On return page:
const result = client.handleRedirectResult();
if (result) console.log("Signed in:", result.refreshToken);