> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Start

> Initiates an OAuth browser flow for the provider, scoped to the specified organization. Opens a browser session at `https://{domain}/b2b/public/oauth/{provider}/start`, then automatically exchanges the resulting token by calling `POST /sdk/v1/b2b/oauth/authenticate`, establishing a member session on success.

## Parameters

**loginRedirectUrl** `String?`

**signupRedirectUrl** `String?`

**organizationId** `String?`

**organizationSlug** `String?`

**customScopes** `List\<String\>?`

**providerParams** `Map\<String, String\>?`

**sessionDurationMinutes** `Int?`

## Returns

**member** `ApiOrganizationV1Member` *required*

The authenticated member.

**properties**

**organizationId** `String` *required*

**memberId** `String` *required*

**emailAddress** `String` *required*

**status** `String` *required*

**name** `String` *required*

**ssoRegistrations** `List\<ApiOrganizationV1SSORegistration\>` *required*

**properties**

**connectionId** `String` *required*

**externalId** `String` *required*

**registrationId** `String` *required*

**ssoAttributes** `Map\<String, JsonElement\>?`

**isBreakglass** `Boolean` *required*

**memberPasswordId** `String` *required*

**oauthRegistrations** `List\<ApiOrganizationV1OAuthRegistration\>` *required*

**properties**

**providerType** `String` *required*

**providerSubject** `String` *required*

**memberOauthRegistrationId** `String` *required*

**profilePictureUrl** `String?`

**locale** `String?`

**emailAddressVerified** `Boolean` *required*

**mfaPhoneNumberVerified** `Boolean` *required*

**isAdmin** `Boolean` *required*

**totpRegistrationId** `String` *required*

**retiredEmailAddresses** `List\<ApiOrganizationV1RetiredEmail\>` *required*

**properties**

**emailId** `String` *required*

**emailAddress** `String` *required*

**isLocked** `Boolean` *required*

**mfaEnrolled** `Boolean` *required*

**mfaPhoneNumber** `String` *required*

**defaultMfaMethod** `String` *required*

**roles** `List\<ApiOrganizationV1MemberRole\>` *required*

**properties**

**roleId** `String` *required*

**sources** `List\<ApiOrganizationV1MemberRoleSource\>` *required*

**trustedMetadata** `Map\<String, JsonElement\>?`

**untrustedMetadata** `Map\<String, JsonElement\>?`

**createdAt** `Instant?`

**updatedAt** `Instant?`

**scimRegistration** `ApiOrganizationV1SCIMRegistration?`

**properties**

**connectionId** `String` *required*

**registrationId** `String` *required*

**externalId** `String?`

**scimAttributes** `ApiB2bScimV1SCIMAttributes?`

**externalId** `String?`

**lockCreatedAt** `Instant?`

**lockExpiresAt** `Instant?`

**memberSession** `ApiB2bSessionV1MemberSession?`

The active member session.

**properties**

**memberSessionId** `String` *required*

**memberId** `String` *required*

**startedAt** `Instant` *required*

**lastAccessedAt** `Instant` *required*

**expiresAt** `Instant` *required*

**authenticationFactors** `List\<ApiSessionV1AuthenticationFactor\>` *required*

**properties**

**type** `ApiSessionV1AuthenticationFactorType` *required*

**deliveryMethod** `ApiSessionV1AuthenticationFactorDeliveryMethod` *required*

**lastAuthenticatedAt** `Instant?`

**createdAt** `Instant?`

**updatedAt** `Instant?`

**emailFactor** `ApiSessionV1EmailFactor?`

**phoneNumberFactor** `ApiSessionV1PhoneNumberFactor?`

**googleOauthFactor** `ApiSessionV1GoogleOAuthFactor?`

**microsoftOauthFactor** `ApiSessionV1MicrosoftOAuthFactor?`

**appleOauthFactor** `ApiSessionV1AppleOAuthFactor?`

**webauthnFactor** `ApiSessionV1WebAuthnFactor?`

**authenticatorAppFactor** `ApiSessionV1AuthenticatorAppFactor?`

**githubOauthFactor** `ApiSessionV1GithubOAuthFactor?`

**recoveryCodeFactor** `ApiSessionV1RecoveryCodeFactor?`

**facebookOauthFactor** `ApiSessionV1FacebookOAuthFactor?`

**cryptoWalletFactor** `ApiSessionV1CryptoWalletFactor?`

**amazonOauthFactor** `ApiSessionV1AmazonOAuthFactor?`

**bitbucketOauthFactor** `ApiSessionV1BitbucketOAuthFactor?`

**coinbaseOauthFactor** `ApiSessionV1CoinbaseOAuthFactor?`

**discordOauthFactor** `ApiSessionV1DiscordOAuthFactor?`

**figmaOauthFactor** `ApiSessionV1FigmaOAuthFactor?`

**gitLabOauthFactor** `ApiSessionV1GitLabOAuthFactor?`

**instagramOauthFactor** `ApiSessionV1InstagramOAuthFactor?`

**linkedInOauthFactor** `ApiSessionV1LinkedInOAuthFactor?`

**shopifyOauthFactor** `ApiSessionV1ShopifyOAuthFactor?`

**slackOauthFactor** `ApiSessionV1SlackOAuthFactor?`

**snapchatOauthFactor** `ApiSessionV1SnapchatOAuthFactor?`

**spotifyOauthFactor** `ApiSessionV1SpotifyOAuthFactor?`

**steamOauthFactor** `ApiSessionV1SteamOAuthFactor?`

**tikTokOauthFactor** `ApiSessionV1TikTokOAuthFactor?`

**twitchOauthFactor** `ApiSessionV1TwitchOAuthFactor?`

**twitterOauthFactor** `ApiSessionV1TwitterOAuthFactor?`

**embeddableMagicLinkFactor** `ApiSessionV1EmbeddableMagicLinkFactor?`

**biometricFactor** `ApiSessionV1BiometricFactor?`

**samlSsoFactor** `ApiSessionV1SAMLSSOFactor?`

**oidcSsoFactor** `ApiSessionV1OIDCSSOFactor?`

**salesforceOauthFactor** `ApiSessionV1SalesforceOAuthFactor?`

**yahooOauthFactor** `ApiSessionV1YahooOAuthFactor?`

**hubspotOauthFactor** `ApiSessionV1HubspotOAuthFactor?`

**slackOauthExchangeFactor** `ApiSessionV1SlackOAuthExchangeFactor?`

**hubspotOauthExchangeFactor** `ApiSessionV1HubspotOAuthExchangeFactor?`

**githubOauthExchangeFactor** `ApiSessionV1GithubOAuthExchangeFactor?`

**googleOauthExchangeFactor** `ApiSessionV1GoogleOAuthExchangeFactor?`

**impersonatedFactor** `ApiSessionV1ImpersonatedFactor?`

**oauthAccessTokenExchangeFactor** `ApiSessionV1OAuthAccessTokenExchangeFactor?`

**trustedAuthTokenFactor** `ApiSessionV1TrustedAuthTokenFactor?`

**organizationId** `String` *required*

**roles** `List\<String\>` *required*

**organizationSlug** `String` *required*

**customClaims** `Map\<String, JsonElement\>?`

**organization** `ApiOrganizationV1Organization` *required*

The organization the member belongs to.

**properties**

**organizationId** `String` *required*

**organizationName** `String` *required*

**organizationLogoUrl** `String` *required*

**organizationSlug** `String` *required*

**ssoJitProvisioning** `String` *required*

**ssoJitProvisioningAllowedConnections** `List\<String\>` *required*

**ssoActiveConnections** `List\<ApiOrganizationV1ActiveSSOConnection\>` *required*

**properties**

**connectionId** `String` *required*

**displayName** `String` *required*

**identityProvider** `String` *required*

**emailAllowedDomains** `List\<String\>` *required*

**emailJitProvisioning** `String` *required*

**emailInvites** `String` *required*

**authMethods** `String` *required*

**allowedAuthMethods** `List\<String\>` *required*

**mfaPolicy** `String` *required*

**rbacEmailImplicitRoleAssignments** `List\<ApiOrganizationV1EmailImplicitRoleAssignment\>` *required*

**properties**

**domain** `String` *required*

**roleId** `String` *required*

**mfaMethods** `String` *required*

**allowedMfaMethods** `List\<String\>` *required*

**oauthTenantJitProvisioning** `String` *required*

**claimedEmailDomains** `List\<String\>` *required*

**firstPartyConnectedAppsAllowedType** `String` *required*

**allowedFirstPartyConnectedApps** `List\<String\>` *required*

**thirdPartyConnectedAppsAllowedType** `String` *required*

**allowedThirdPartyConnectedApps** `List\<String\>` *required*

**customRoles** `List\<ApiOrganizationV1CustomRole\>` *required*

**properties**

**roleId** `String` *required*

**description** `String` *required*

**permissions** `List\<ApiOrganizationV1CustomRolePermission\>` *required*

**trustedMetadata** `Map\<String, JsonElement\>?`

**createdAt** `Instant?`

**updatedAt** `Instant?`

**organizationExternalId** `String?`

**ssoDefaultConnectionId** `String?`

**scimActiveConnection** `ApiOrganizationV1ActiveSCIMConnection?`

**properties**

**connectionId** `String` *required*

**displayName** `String` *required*

**bearerTokenLastFour** `String` *required*

**bearerTokenExpiresAt** `Instant?`

**allowedOauthTenants** `Map\<String, JsonElement\>?`

**sessionToken** `String` *required*

The opaque session token.

**sessionJwt** `String` *required*

The session JWT.

```swift theme={null}
let params = B2BOAuthStartParameters(
    organizationId: "org-test-d5a3b680-e8a3-40c0-b815-ab79986666d0",
    loginRedirectUrl: "myapp://callback",
    signupRedirectUrl: "myapp://callback",
    sessionDurationMinutes: 30
)
let response = try await StytchB2B.oauth.google.start(params)
```
