Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/verify-expo-map-native-to-web-google-cancel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 1 addition & 1 deletion .claude/skills/verify-clerk-expo/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Each feature file starts with an H1 title and one paragraph describing the user-
- [Custom sign-up flow](./custom-flow-sign-up.md) covers an email and password sign-up built on `useSignUp`.
- [Token cache persistence](./token-cache-persistence.md) covers restoring the same session after a relaunch.
- [Native and JS session sync](./native-js-sync.md) covers a native sign-out and a native password sign-in reaching `useAuth`, `useUser`, and `useSession`, that sign-in surviving a relaunch, a second native sign-in in one process, a native sign-in whose first client fetch fails, a ticket sign-in reaching the native profile, and a JS sign-out clearing the hooks, and it lists the active organization's sync and the foreground repair as states no spec reaches.
- [Native modules](./native-modules.md) covers `useSignInWithGoogle` opening the native Google sign-in, a cancel of it on iOS, and on Android when back closes Google's page, and `useBiometricCredentials` reporting what its native module found on the device.
- [Native modules](./native-modules.md) covers `useSignInWithGoogle` opening the native Google sign-in, a cancel of it on iOS, and on Android when Google's page closes, by back or by itself, and `useBiometricCredentials` reporting what its native module found on the device.
- [Update required](./update-required.md) covers the update screen for a signed-in and a signed-out user on a build below the minimum, the same session returning once the minimum is lowered, and a build at the minimum, on both platforms, and it lists the states no spec reaches.
- [Native to Web SSO](./native-to-web-sso.md) covers the test app's own screen that loads the Account Portal in a WebView with `useAuthenticatedWebView`, signed in as the native user, and a transfer refused with `feature_not_enabled` when session transfers are off, on both platforms, and it lists the states no spec reaches.

Expand Down
14 changes: 7 additions & 7 deletions .claude/skills/verify-clerk-expo/features/native-to-web-sso.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ Preconditions:

## States a spec cannot reach

| State | Where the app decides | What it takes |
| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Opening the page in the user's browser | `openInBrowser.ts`, `openInBrowser` | The app hands the URL to a browser, so the page is in another app that the harness does not read. On iOS it calls `Linking.openURL`. On Android it starts a browser intent through `expo-intent-launcher` with `REFERRER_NAME` set to `android-app://<package>`, and rejects with `missing_dependency` without that package (`launchBrowser.android.ts`). Either rejects with `browser_unavailable` when no browser opens the URL. A refused redeem lands on the destination in the browser after the call resolved, and the SDK does not see it. The test app does not call it |
| A URL the app presents itself | `sessionTransfer.ts`, `prepareSessionTransfer` | A screen of the app's own that opens `transfer.url`. `useAuthenticatedWebView` calls it, so the WebView test covers the request, but nothing tests a caller that presents the URL itself |
| A destination refused for its scheme or host | Clerk's checks of `destination` | A production instance, which requires `https` and a host on one of its domains. The harness creates development instances only, which allow any `http` or `https` URL |
| A refused sign-in that lands on the destination | `webViewNavigation.ts`, `judgeNavigation`, from `__clerk_status=session_transfer_failed` and `__clerk_error_code` | A transfer that Clerk creates and then refuses to redeem, such as an `expired` or `already_used` token. The spec's refusal comes before loading, from the create request. `webViewNavigation.test.ts` covers the redirect with unit tests only |
| The web session ending at native sign-out | Clerk's revocation of a transferred web session when its native session ends | A WebView that outlives the native session. The hook returns no `webViewProps` once the app signs out, the screen's WebView is `incognito`, and `Done` drops the WebView before a sign-out |
| State | Where the app decides | What it takes |
| ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Opening the page in the user's browser | `openInBrowser.ts`, `openInBrowser` | The app hands the URL to a browser, so the page is in another app that the harness does not read. On iOS it calls `Linking.openURL`. On Android it starts a browser intent through `expo-intent-launcher` with `REFERRER_NAME` set to `android-app://<package>`, and rejects with `missing_dependency` without that package, or when it finds no package name in `expo-application` or the app config (`launchBrowser.android.ts`). Either rejects with `browser_unavailable` when no browser opens the URL. A refused redeem lands on the destination in the browser after the call resolved, and the SDK does not see it. The test app does not call it |
| A URL the app presents itself | `sessionTransfer.ts`, `prepareSessionTransfer` | A screen of the app's own that opens `transfer.url`. `useAuthenticatedWebView` calls it, so the WebView test covers the request, but nothing tests a caller that presents the URL itself |
| A destination refused for its scheme or host | Clerk's checks of `destination` | A production instance, which requires `https` and a host on one of its domains. The harness creates development instances only, which allow any `http` or `https` URL |
| A refused sign-in that lands on the destination | `webViewNavigation.ts`, `judgeNavigation`, from `__clerk_status=session_transfer_failed` and `__clerk_error_code` | A transfer that Clerk creates and then refuses to redeem, such as an `expired` or `already_used` token. The spec's refusal comes before loading, from the create request. `webViewNavigation.test.ts` and `useAuthenticatedWebView.test.tsx` cover the redirect with unit tests only |
| The web session ending at native sign-out | Clerk's revocation of a transferred web session when its native session ends | A WebView that outlives the native session. The hook returns no `webViewProps` once the app signs out, the screen's WebView is `incognito`, and `Done` drops the WebView before a sign-out |

## Gotchas

Expand Down
Loading