Skip to content

@clerk/expo: useSSO does not expose or forward oidcPrompt #9680

Description

@kockar96

Preliminary Checks

Reproduction

https://github.com/kockar96/clerk-expo-oidc-prompt-repro

Publishable key

pk_live_Y2xlcmsuc3VndS5ub3ck

Description

Summary

In @clerk/expo 4.6.5, the regular useSSO hook does not expose oidcPrompt in StartSSOFlowParams or forward it to signIn.create, even though the underlying sign-in API supports it. This prevents callers from explicitly requesting Google's account chooser through startSSOFlow.

This report concerns useSSO imported from @clerk/expo, not the experimental API or native Google sign-in.

Steps to reproduce

  1. Use @clerk/expo 4.6.5 in an Expo app with Google enabled.
  2. Try to request account selection:
import { useSSO } from '@clerk/expo';

const { startSSOFlow } = useSSO();

await startSSOFlow({
  strategy: 'oauth_google',
  oidcPrompt: 'select_account',
});
  1. TypeScript rejects oidcPrompt because it is not part of StartSSOFlowParams.
  2. If the type check is bypassed, the wrapper still omits the value from the object passed to signIn.create.

The omission can also be verified directly in the published package's dist/hooks/useSSO.js and dist/hooks/useSSO.d.ts, without a live OAuth session.

Expected behavior

startSSOFlow should accept oidcPrompt and forward it to signIn.create, allowing Google sign-in to request prompt=select_account.

Actual behavior

The wrapper constructs the sign-in request from selected fields and drops oidcPrompt. With an existing Google browser session, sign-in can proceed directly using an account instead of showing the chooser. The visible behavior depends on the Google session; the parameter omission is deterministic.

Verified workaround

We locally added oidcPrompt?: string to StartSSOFlowParams and the following property to the wrapper's signIn.create call:

...(startSSOFlowParams.oidcPrompt
  ? { oidcPrompt: startSSOFlowParams.oidcPrompt }
  : {}),

Passing oidcPrompt: 'select_account' then restored the account picker in manual testing. We also added automated tests against the installed wrapper to verify forwarding, existing-account and transferable new-account callbacks, cancellation, and an unchanged Apple request.

Related issue

#9177, fixed by #9354, addresses a similar omission in createExternalAccount and reauthorize. This report is about the separate Expo useSSO wrapper, which still omits the parameter in 4.6.5.

Google documents select_account here: https://developers.google.com/identity/openid-connect/openid-connect#authenticationuriparameters

We noticed the visible behavior change around a development-to-production transition, but have not established its cause and are not claiming that this is a recent SDK regression. The reproducible issue is the missing parameter exposure and forwarding.

Environment

Relevant package versions:
@clerk/expo: 4.6.5
expo: 57.0.18
react-native: 0.86.3
react: 19.2.3

Flow: browser-based Google SSO using useSSO from @clerk/expo.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions