Web Auth
A system web-auth session for OAuth and OpenID-Connect sign-in — openAuthSession presents a secure browser sheet over your app and hands the provider's callback URL straight back to the awaited call.
Installation
pnpm add @sigx/lynx-webauth
sigx prebuild # auto-links the native moduleAbout
@sigx/lynx-webauth is the right primitive for OAuth / OIDC sign-in and account-connect flows. It presents the OS web-auth UI — ASWebAuthenticationSession on iOS, Chrome Custom Tabs on Android — over your app rather than an embedded WebView, so identity providers like Google and Microsoft accept it. The sheet shares the system browser's cookies (the user is often already signed in), and when the provider redirects to your app's scheme the session dismisses itself and returns the callback URL inline — no global deep-link listener, no foreground polling.
The call always resolves: a user backing out is { canceled: true } and a failure is { error }, never a thrown promise. An opt-in @sigx/lynx-webauth/oauth helper covers the frozen parts of the PKCE authorization-code flow (PKCE per RFC 7636, state, callback parsing); token exchange stays in your app.
It is part of the Lynx module family, designed to drop in alongside the other native modules.
Next steps
Continue with Installation for project setup, head to the Usage guide for the PKCE recipe, or jump to the API reference.
