Skip to content

Commit

Permalink
add callout; update todo
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisintech committed Feb 4, 2025
1 parent 7d3fd2f commit 01eef70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/_partials/expo/enterprise-sso-custom-flow.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Expo supports SAML Enterprise SSO, but does not support EASIE or OIDC.
> [!IMPORTANT]
> Expo supports SAML Enterprise SSO, but does not support EASIE or OIDC.
The following example demonstrates how to create a custom SSO flow with [SAML](docs/authentication/enterprise-connections/overview#saml). In the following example, when the user selects the "Sign in with SAML" button, they will be redirected to the provider's authentication page. Once they authenticate, they will be redirected back to your app. If there are missing requirements, like they need to complete MFA, then the `createdSessionId` will remain `null`, and you'll need to add logic to handle the missing requirements. If there are no missing requirements, then the user will be signed in.
The following example demonstrates how to create a custom SSO flow with [SAML](docs/authentication/enterprise-connections/overview#saml). In the following example, when the user selects the "Sign in with SAML" button, they'll be redirected to the provider's authentication page. Once they authenticate, they'll be redirected back to your app. If there are missing requirements, like needing to completeMFA, then the `createdSessionId` will remain `null`, and you'll need to add logic to handle the missing requirements. If there are no missing requirements, then the user will be signed in.

```tsx {{ filename: 'app/(auth)/sign-in.tsx', collapsible: true }}
import React, { useCallback, useEffect, useState } from 'react'
Expand Down
4 changes: 3 additions & 1 deletion docs/custom-flows/enterprise-connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ The following example shows two files:
1. The sign-in page where the user can start the Enterprise SSO flow.
1. The SSO callback page where the flow is completed.

{/* Does the signIn need to be awaited? If so, we should update to use try,catch */}

<Tabs items={["Next.js", "Expo"]}>
<Tab>
<CodeBlockTabs options={["Sign in page", "SSO callback page"]}>
Expand Down Expand Up @@ -88,7 +90,7 @@ The following example shows two files:

## Enterprise account transfer flows

{/* TODO(Laura): I believe this is built in with Expo's `useSSO()` hook, so I don't think we need to add Expo example here. Is this correct? */}
{/* TODO(Laura): I believe this is built in with Expo's `useSSO()` hook, so I don't think we need to add Expo example here. Is this correct? Also, I tested the above example with Nextjs: I went to /sign-in, and tried signing in with a non-existent user, and it created the user for me. So is this section even necessary? */}

It is common for users who are authenticating with an enterprise account to use a sign-in button when they mean to sign-up, and vice versa. For those cases, the `SignIn` and `SignUp` objects have a `transferable` status that indicates whether the user can be transferred to the other flow.

Expand Down

0 comments on commit 01eef70

Please sign in to comment.