Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(clerk-expo): Deprecate useOAuth and introduce docs for useSSO #1908

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

LauraBeatris
Copy link
Member

@LauraBeatris LauraBeatris commented Jan 16, 2025

Related: #1907

Explanation:

⚠️ Relies on clerk/javascript#4880
⚠️ Needs these redirects https://github.com/clerk/clerk/pull/941

A new React hook got added to @clerk/expo to handle all SSO strategies, such as SAML and social/custom OAuth

useOAuth got deprecated in favor of useSSO

This PR:

Resolves ORGS-460

  • Deprecates useOAuth guide
  • Introduces docs for useSSO
  • Introduces code snippets for both social OAuth and SAML

Checklist

  • I have clicked on "Files changed" and performed a thorough self-review
  • I have added the "deploy-preview" label and added the preview link(s) to this PR description
  • All existing checks pass

Copy link

Hey, here’s your docs preview: https://clerk.com/docs/pr/1908

@LauraBeatris LauraBeatris force-pushed the laura/orgs-471-update-docs-for-clerkexpo branch 3 times, most recently from 47515ed to a6bdd0a Compare January 16, 2025 01:54
@LauraBeatris LauraBeatris marked this pull request as ready for review January 16, 2025 01:55
@LauraBeatris LauraBeatris requested a review from a team as a code owner January 16, 2025 01:55
@LauraBeatris LauraBeatris force-pushed the laura/orgs-471-update-docs-for-clerkexpo branch 2 times, most recently from 47aba5d to ba0aeb1 Compare January 16, 2025 01:57

<Tabs items={["With OAuth", "With SAML"]}>
<Tab>
The following example demonstrates how to create a custom SSO sign-in flow for [Google accounts](/docs/authentication/social-connections/google).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is a custom sign-in flow, do we still want to link to this page?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which page? Do you mean /docs/authentication/social-connections/google?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Would it make sense?

@victoriaxyz
Copy link
Contributor

victoriaxyz commented Jan 16, 2025

Hey @LauraBeatris, here's my review.

Update: d13a572

Notes

@LauraBeatris
Copy link
Member Author

We should also update for: https://clerk.com/docs/custom-flows/oauth-connections

@LauraBeatris LauraBeatris force-pushed the laura/orgs-471-update-docs-for-clerkexpo branch from c4d0914 to f9621d8 Compare January 17, 2025 18:25
@alexisintech
Copy link
Member

alexisintech commented Jan 17, 2025

Hi! Just did a review, and a question:

  1. I'm not seeing parameters for the useSSO() hook?

Summary of my review:
manifest.json

  • Added useOAuth() back to the sidenav, and marked it as deprecated
    docs/references/expo/use-oauth.mdx
  • Updated the deprecation callout in the useOAuth() guide
    docs/references/expo/use-sso.mdx
  • aligned parameter descriptions with what's used in other docs
  • added missing params for StartSSOFlowParams

@alexisintech alexisintech force-pushed the laura/orgs-471-update-docs-for-clerkexpo branch from 29c7a0b to aba6dc2 Compare January 17, 2025 21:36
@alexisintech
Copy link
Member

Will test the custom flow code when the JavaScript PR is ready to merge/is merged.

Outstanding question:
I'm not seeing parameters for the useSSO() hook?

@LauraBeatris LauraBeatris force-pushed the laura/orgs-471-update-docs-for-clerkexpo branch from cc4b595 to a5f96d4 Compare January 24, 2025 18:16
@LauraBeatris LauraBeatris requested a review from a team January 24, 2025 18:17
@LauraBeatris LauraBeatris force-pushed the laura/orgs-471-update-docs-for-clerkexpo branch 4 times, most recently from a061c67 to c5b9f1d Compare January 24, 2025 18:29
Copy link

Hey, here’s your docs preview: https://clerk.com/docs/pr/1908

Copy link
Contributor

@NicolasLopes7 NicolasLopes7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @LauraBeatris !

@LauraBeatris LauraBeatris force-pushed the laura/orgs-471-update-docs-for-clerkexpo branch from c5b9f1d to 81107e2 Compare January 28, 2025 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants