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

SignUpButton fails to authenticate user if Facebook account was previously linked #4803

Open
4 tasks done
gabrielmaldi opened this issue Dec 17, 2024 · 0 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@gabrielmaldi
Copy link

Preliminary Checks

Reproduction

https://app.replay.io/recording/localhost3000--a6a7a2fd-696d-43ef-b216-ce4c9f3114df?commentId=&focusWindow=eyJiZWdpbiI6eyJwb2ludCI6IjAiLCJ0aW1lIjowfSwiZW5kIjp7InBvaW50IjoiNTg0MTMzMzk2NjUwOTU4NTM2MjQwNzE2NDEzNTYwNDIyNCIsInRpbWUiOjM2OTB9fQ%253D%253D&point=324518553658633099732480646185098&primaryPanel=tour&secondaryPanel=console&time=133&viewMode=non-dev

Publishable key

pk_test_Z2xvd2luZy1iYXQtOTguY2xlcmsuYWNjb3VudHMuZGV2JA

Description

Steps to reproduce:

  1. Use <SignUpButton mode="modal">
  2. Select Facebook:
image
  1. Make sure you had already signed-up using Facebook (so this is conceptually a sign-in really) and select Continue:
image

Expected behavior:

The user is taken back to the site and is now logged-in.

Actual behavior:

The user is taken back to the site but is not logged-in.

The URL is http://localhost:3000/#/sso-callback and these are the requests:

image

Everything works fine if I use <SignInButton> instead, or if I select Already have an account? [Sign in] in the sign-up modal (before selecting Facebook):

image image

In those cases, these are the requests:

image

The one I highlighted seems to be the one making auth work. And the final URL is http://localhost:3000/ (no /#/sso-callback).

I'm not using either of: NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL, NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL, forceRedirectUrl, signInForceRedirectUrl, signUpForceRedirectUrl.

My reasoning is that since if I first select Already have an account? [Sign in], everything works, then this is probably a bug in SignUpButton.

Thanks

Environment

System:
    OS: macOS 15.2
    CPU: (11) arm64 Apple M3 Pro
    Memory: 77.48 MB / 36.00 GB
    Shell: 3.7.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 22.12.0 - /usr/local/bin/node
    Yarn: 1.22.22 - /opt/homebrew/bin/yarn
    npm: 10.9.0 - /usr/local/bin/npm
    bun: 1.1.39 - ~/.bun/bin/bun
    Watchman: 2024.12.02.00 - /opt/homebrew/bin/watchman
  Browsers:
    Brave Browser: 131.1.73.101
    Chrome: 131.0.6778.140
    Chrome Canary: 133.0.6901.0
    Edge: 130.0.2849.56
    Safari: 18.2
    Safari Technology Preview: 18.2
  npmPackages:
    @arcjet/next: ^1.0.0-alpha.34 => 1.0.0-alpha.34
    @babel/core: ^7.26.0 => 7.26.0
    @clerk/nextjs: ^6.9.3 => 6.9.3
    @clerk/themes: ^2.2.2 => 2.2.2
    @mailchimp/mailchimp_marketing: ^3.0.80 => 3.0.80
    @mantine/carousel: ^7.15.1 => 7.15.1
    @mantine/colors-generator: ^7.15.1 => 7.15.1
    @mantine/core: ^7.15.1 => 7.15.1
    @mantine/dates: ^7.15.1 => 7.15.1
    @mantine/form: ^7.15.1 => 7.15.1
    @mantine/hooks: ^7.15.1 => 7.15.1
    @mantine/modals: ^7.15.1 => 7.15.1
    @mantine/notifications: ^7.15.1 => 7.15.1
    @mantine/nprogress: ^7.15.1 => 7.15.1
    @next/bundle-analyzer: 15.1.0 => 15.1.0
    @portabletext/react: ^3.2.0 => 3.2.0
    @portabletext/to-html: ^2.0.13 => 2.0.13
    @portabletext/types: ^2.0.13 => 2.0.13
    @react-email/components: ^0.0.31 => 0.0.31
    @sanity/image-url: ^1.1.0 => 1.1.0
    @sanity/webhook: ^4.0.4 => 4.0.4
    @sentry/nextjs: ^8.46.0 => 8.46.0
    @t3-oss/env-nextjs: ^0.11.1 => 0.11.1
    @tabler/icons-react: ^3.26.0 => 3.26.0
    @talkjs/react: ^0.1.11 => 0.1.11
    @total-typescript/ts-reset: ^0.6.1 => 0.6.1
    @types/async: ^3.2.24 => 3.2.24
    @types/bun: ^1.1.14 => 1.1.14
    @types/jsdom: ^21.1.7 => 21.1.7
    @types/jsonwebtoken: ^9.0.7 => 9.0.7
    @types/lodash: ^4.17.13 => 4.17.13
    @types/mailchimp__mailchimp_marketing: ^3.0.20 => 3.0.20
    @types/node: ^22.10.2 => 22.10.2
    @types/superagent: ^8.1.9 => 8.1.9
    @vercel/analytics: ^1.4.1 => 1.4.1
    @vercel/kv: ^3.0.0 => 3.0.0
    @vercel/postgres: ^0.10.0 => 0.10.0
    add-to-calendar-button: ^2.7.3 => 2.7.3
    async: ^3.2.6 => 3.2.6
    babel-loader: ^9.2.1 => 9.2.1
    babel-plugin-react-compiler: ^19.0.0-beta-201e55d-20241215 => 19.0.0-beta-201e55d-20241215
    change-case: ^5.4.4 => 5.4.4
    chroma-js: ^3.1.2 => 3.1.2
    clsx: ^2.1.1 => 2.1.1
    conditional-wrap: ^1.0.2 => 1.0.2
    dayjs: ^1.11.13 => 1.11.13
    drizzle-kit: ^0.30.1 => 0.30.1
    drizzle-orm: ^0.38.2 => 0.38.2
    embla-carousel-autoplay: 7.1.0 => 7.1.0
    embla-carousel-react: 7.1.0 => 7.1.0
    eslint-plugin-deprecated-props: ^0.1.3 => 0.1.3
    eslint-plugin-deprecation: ^3.0.0 => 3.0.0
    eslint-plugin-react-compiler: ^19.0.0-beta-201e55d-20241215 => 19.0.0-beta-201e55d-20241215
    jiti: ^2.4.1 => 2.4.1
    jsdom: ^25.0.1 => 25.0.1
    jsonwebtoken: ^9.0.2 => 9.0.2
    lodash: ^4.17.21 => 4.17.21
    mantine-datatable: 7.14.5 => 7.14.5
    next: ^15.1.0 => 15.1.0
    next-sanity: ^9.8.27 => 9.8.27
    next-view-transitions: ^0.3.4 => 0.3.4
    pg: ^8.13.1 => 8.13.1
    postcss: ^8.4.49 => 8.4.49
    postcss-preset-mantine: ^1.17.0 => 1.17.0
    postcss-simple-vars: ^7.0.1 => 7.0.1
    prettier: ^3.4.2 => 3.4.2
    react: ^19.0.0 => 19.0.0
    react-canvas-confetti: ^2.0.7 => 2.0.7
    react-dom: ^19.0.0 => 19.0.0
    react-email: ^3.0.4 => 3.0.4
    react-geolocated: ^4.2.0 => 4.3.0
    react-google-autocomplete: ^2.7.3 => 2.7.3
    react-google-places-autocomplete: ^4.1.0 => 4.1.0
    remix-params-helper: ^0.5.1 => 0.5.1
    resend: ^4.0.1 => 4.0.1
    server-only: ^0.0.1 => 0.0.1
    sqids: ^0.3.0 => 0.3.0
    stripe: ^17.4.0 => 17.4.0
    superjson: ^2.2.2 => 2.2.2
    svix: ^1.44.0 => 1.44.0
    swr: ^2.2.5 => 2.2.5
    talkjs: ^0.31.0 => 0.31.0
    type-fest: ^4.30.2 => 4.30.2
    types-react:  19.0.0-rc.1
    types-react-dom:  19.0.0-rc.1
    typescript: ^5.7.2 => 5.7.2
    typescript-plugin-css-modules: ^5.1.0 => 5.1.0
    vercel: ^39.2.2 => 39.2.2
    zod: ^3.24.1 => 3.24.1
@gabrielmaldi gabrielmaldi added the needs-triage A ticket that needs to be triaged by a team member label Dec 17, 2024
@linear linear bot added bug Something isn't working and removed needs-triage A ticket that needs to be triaged by a team member labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant