Skip to content

OpenAuthSession

OpenAuthSession = (authorizeUrl, redirectUrl) => Promise<string | null>

Defined in: src/auth.ts:53

Opens an OAuth authorization browser and resolves with the redirect URL the provider returns (or null if the user cancelled). The consumer supplies this so the module stays free of any browser dependency — e.g. with expo-web-browser:

import * as WebBrowser from 'expo-web-browser';
const openAuthSession = async (authorizeUrl, redirectUrl) => {
const r = await WebBrowser.openAuthSessionAsync(authorizeUrl, redirectUrl);
return r.type === 'success' ? r.url : null;
};

string

string

Promise<string | null>