"User with this email not found" error when using generateLink
Bug report
- [X] I confirm this is a bug with Supabase, not with my own application.
- [X] 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
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
The issue has been fixed.
I'm also experiencing this issue. Any solutions? Do I need to update my Supabase Postgres version?
Reopening to bring supabase maintainers attention.
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
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
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
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.
@vacas5 upgrading the CLI upgrades the auth service's docker image version used which should contain the fix