Skip to main content
API Reference / modelence / client / signInWithOAuth
signInWithOAuth(options): Promise<void>
Defined in: packages/modelence/src/auth/client/index.ts:315 Start an OAuth sign-in. On the web this navigates to the provider and the flow finishes on its own — the session cookie is set and the browser lands back on your site. Pass redirectUri to run the native flow: the device browser opens the provider, and when the flow completes Modelence redirects back to that deep link with a single-use code query parameter. Hand that code to loginWithOAuth to finish signing in. The redirect target must be listed in the server’s auth.mobile.redirectUrls, otherwise the request is rejected before the provider is ever reached. The native flow additionally binds the sign-in to this device: a verifier is held in memory here and replayed by loginWithOAuth, so a code delivered to the app from outside this flow cannot be redeemed.

Parameters

Returns

Promise<void>

Examples