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

"User with this email not found" error when using generateLink #875

Closed
2 tasks done
jide opened this issue Apr 2, 2024 · 9 comments
Closed
2 tasks done

"User with this email not found" error when using generateLink #875

jide opened this issue Apr 2, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@jide
Copy link

jide commented Apr 2, 2024

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

In local development, everything works fine:

  const { data, error } = await supabaseService.auth.admin.generateLink({
    type: "signup",
    email,
    password,
  });

Works as expected.

In production, it throws "User with this email not found". I triple checked, email and password are legit non-existing values.

To Reproduce

I'm unable to reproduce this as local dev works as expected :(

Expected behavior

I really do not see how this error can be thrown by the generateLink() function.

System information

  • OS: local dev : macOS
  • Version of supabase-js: 2.39.7
  • Version of Node.js: 20
@jide jide added the bug Something isn't working label Apr 2, 2024
@jide
Copy link
Author

jide commented Apr 3, 2024

Ok, I reproduced this, and I confirm this is a bug recently introduced.

It basically breaks signups for apps where an email is sent using generateLink(), which is really bad.

To reproduce:

  • Create a supabase project
  • Clone this repository
  • Set env vars
  • Launch node index.js
  • It throws AuthApiError: User with this email not found

https://github.com/jide/supabase-issue-875

@jide
Copy link
Author

jide commented Apr 3, 2024

The issue has been fixed.

Capture d’écran 2024-04-04 à 00 37 52

@jide jide closed this as completed Apr 3, 2024
@ham-evans
Copy link

I'm also experiencing this issue. Any solutions? Do I need to update my Supabase Postgres version?

@jide
Copy link
Author

jide commented Apr 8, 2024

Reopening to bring supabase maintainers attention.

@jide jide reopened this Apr 8, 2024
@vacas5
Copy link

vacas5 commented Apr 16, 2024

Currently experiencing something similar, but using "invite" type when generating a link.

For local development, all is well, but in github actions the following is failing with [AuthApiError]: User with this email not found

const { data, error } = await supabase.auth.admin.generateLink({
  type: 'invite',
  email
})

System information:

@supabase/supabase-js 2.39.3

node-version: 18.19.1

Operating System
Ubuntu
22.04.4
LTS

@tech-betastreets
Copy link

tech-betastreets commented Apr 27, 2024

Edit: @frschi suggestion to upgrade GoTrue resolved the issue for me

Facing same issue on Local

  const link = await supabase.auth.admin.generateLink({
    type: 'signup',
    email,
    password
  });

Is giving the following error

error: AuthApiError: User with this email not found

App
https://esm.sh/@supabase/[email protected]?target=deno
supabase-edge-runtime-1.45.2 (compatible with Deno v1.40.3)

Supabase
GoTrue version: 2.145.0
PostgREST version: 12.0.1
Postgres version: 15.1.0.1417

@frschi
Copy link

frschi commented Apr 29, 2024

I had the same issue in my local supabase docker. At the time writing this comment, the docker-compose.yml in the official supabase repo docker folder, the auth service (supabase/gotrue) has verison: v2.145.0, i updated it to the latest version on docker hub which is supabase/gotrue:v2.150.1 and the problem was solved. @tech-betastreets so from your comment it seems like your GoTrue version is too old

@vacas5
Copy link

vacas5 commented Apr 30, 2024

For my issue, the reason that it was working for local development but not in Github actions is because locally we were using v1.153.4 of supabase cli, which was installing v2.130.0 of gotrue. When I set my action to the following the issue resolved.

- name: Setup Supabase
        uses: supabase/setup-cli@v1
        with:
          version: 1.153.4

I have yet to try upgrading to the latest version of the CLI.

@kangmingtay
Copy link
Member

@vacas5 upgrading the CLI upgrades the auth service's docker image version used which should contain the fix

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

6 participants