You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(js): add scope query parameter to OAuth consent endpoint fetch
Add clientId and scope props to __internal_OAuthConsentProps so the
OAuthConsent component can fetch consent details from
/v1/me/oauth/consent/{client_id}?scope=<space-delimited-scopes>.
When clientId is provided, the component fetches consent data from the
FAPI endpoint. The scope prop is a space-delimited list of OAuth scopes
included as a query parameter on the request. Fetched data is merged
with any directly supplied props, maintaining backward compatibility.
Changes:
- packages/shared: Add clientId, scope to __internal_OAuthConsentProps;
make data props optional (oAuthApplicationName, scopes, redirectUrl,
onAllow, onDeny)
- packages/shared: Add __internal_fetchOAuthConsent to Clerk interface
- packages/clerk-js: Implement __internal_fetchOAuthConsent on Clerk
class using the FAPI client
- packages/react: Wire __internal_fetchOAuthConsent through
IsomorphicClerk
- packages/ui: OAuthConsent component fetches consent data when clientId
is provided, with loading state
- packages/clerk-js/sandbox: Support client_id and scope URL params
Part of USER-4924
0 commit comments