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

[@clerk/nextjs]: Redirect to /sign-up when sign up with SSO and legal enabled #4586

Open
4 tasks done
dikaioai opened this issue Nov 15, 2024 · 3 comments
Open
4 tasks done
Labels
needs-triage A ticket that needs to be triaged by a team member

Comments

@dikaioai
Copy link
Contributor

dikaioai commented Nov 15, 2024

Preliminary Checks

Reproduction

https://github.com/dikaioai/clerk-nextjs-legal-oauth-error-reproduction

Publishable key

pk_test_aW5mb3JtZWQtY3JhYi0zMS5jbGVyay5hY2NvdW50cy5kZXYk

Description

Steps to reproduce:

Deps:

    "@clerk/nextjs": "6.3.4",
    "@clerk/backend": "1.16.4",
    "@clerk/localizations": "3.6.4",
    "@clerk/themes": "2.1.45",
    "@clerk/types": "4.34.0",

Dev deps:

    "@clerk/clerk-js": "^5.34.2",
    "@clerk/testing": "^1.3.26",

Steps to Reproduce

Using the pre-build SignUp components from @clerk/nextjs package:

  1. Navigate to the sign-up page
  2. Select Google SSO (or any other available SSO provider)
  3. Enter your SSO credentials

Expected Behavior

After SSO authentication, users should be redirected to the /sign-up/continue page where they only need to accept the legal terms.

Actual Behavior

Inconsistent behavior observed:

  • First attempt: Usually works as expected
  • Subsequent attempts: Redirects to the /sign-up page with:
    • Pre-filled first name
    • Pre-filled last name
    • Pre-filled email
    • Password field required
    • Legal terms checkbox required

Environment

System:
    OS: macOS 15.0
    CPU: (8) arm64 Apple M1
    Memory: 64.31 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.12.2/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 9.13.2 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 131.0.6778.69
    Safari: 18.0
  npmPackages:
    @anthropic-ai/vertex-sdk: 0.4.3 => 0.4.3
    @biomejs/biome: 1.9.4 => 1.9.4
    @decode-plus/typescript-config: workspace:* => 0.0.0
    @dotenvx/dotenvx: 1.22.0 => 1.22.0
    @google/generative-ai: 0.21.0 => 0.21.0
    @langchain/anthropic: 0.3.7 => 0.3.7
    @langchain/cohere: 0.3.1 => 0.3.1
    @langchain/community: 0.3.11 => 0.3.11
    @langchain/core: 0.3.17 => 0.3.17
    @langchain/google-genai: ^0.1.2 => 0.1.2
    @langchain/google-vertexai: ^0.1.0 => 0.1.0
    @langchain/groq: 0.0.17 => 0.0.17
    @langchain/langgraph: 0.2.20 => 0.2.20
    @langchain/langgraph-sdk: 0.0.21 => 0.0.21
    @langchain/openai: 0.3.11 => 0.3.11
    @langchain/pinecone: 0.1.1 => 0.1.1
    ai: 3.4.33 => 3.4.33
    google-auth-library: 9.14.2 => 9.14.2
    langchain: 0.3.5 => 0.3.5
    langsmith: 0.2.3 => 0.2.3
    lefthook: 1.8.2 => 1.8.2
    llamaindex: 0.8.3 => 0.8.3
    nanoid: 5.0.8 => 5.0.8
    turbo: 2.3.0 => 2.3.0
    typescript: 5.6.3 => 5.6.3
    zod: 3.23.8 => 3.23.8
@dikaioai dikaioai added the needs-triage A ticket that needs to be triaged by a team member label Nov 15, 2024
@dikaioai dikaioai changed the title [@clerk/nextjs]: Redirect to /sign-up when sign up with oauth and legal enabled [@clerk/nextjs]: Redirect to /sign-up when sign up with SSO and legal enabled Nov 15, 2024
@octoper
Copy link
Member

octoper commented Nov 18, 2024

Hey @dikaioai!

I've tried to reproduce the issue but I could not, do you still face the issue?

@dikaioai
Copy link
Contributor Author

Hello Vangeli!

I will provide a reproducible repository today. Thank you for reminding me about this.

The issue occurs in the following scenario:

  1. A user successfully signs up with SSO for the first time
  2. The user deletes their account
  3. The user attempts to sign up again using SSO

This scenario should be very rare in production.

@octoper
Copy link
Member

octoper commented Nov 27, 2024

Hey!

Thank you for sharing, I will take another look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage A ticket that needs to be triaged by a team member
Projects
None yet
Development

No branches or pull requests

2 participants