Is there an issue with the Forgotten Password Emai...
# help
m
Is there an issue with the Forgotten Password Email? I'm getting - "Missing or invalid credentials." Error when user can create account and login in? Thanks
n
Hello @Michie! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
Can you provide more info on your call? I've seen "Missing or invalid credentials" returned if your apikey or authorization header on calls to auth is incorrect.
n
Michie (2022-06-02)
m
Hi Gary! Thanks for the response. This is the url having the error: https://ykpfxdorwihvilquetxj.supabase.co/auth/v1/recover I'm using this code to call for the resetPasswordForEmail function:
Copy code
const { data, error } = await supabase.auth.api.resetPasswordForEmail(
        this.form.email
)
For the ApiKey and Authorization Header, it's the same one use in auth for creation of account and login.
Hi @garyaustin - i'm within the supabase dashboard and tried to fire a Reset Password for a certain user. I'm getting an error too.
I was able to send once, and I updated some content so I tried again and got this error.
g
You say a certain user.... Do some users work? I just verified auth.api.resetPass... works with basic apikey and no user jwt, but if UI is not working, then something else is going on for you.
m
Some users - tried two users and both having the same issue
The screenshot that I have shared is from Supabase Dashboard where you select Reset Password or Send Magic Link
Gary, this might be weird but I have a staging and a production project at supabase - staging is working ok - forget password. However the production DB at supabase is having issue and isn't allowing me to do reset password even in the supabase dashboard.
Any idea what could be the issue?
g
On just some users or all?
m
All
g
Well it is either a setting, some weird problem just on your instance, or something being upgraded behind the scenes and only one project had been updated. The latter would not be good...
Anything different in your auth settings, including SMTP?
m
nope everything is the same. Didn't touch the default SMTP
It seems like in the Supabase Dashboard all the users doesn't exist even if it is there
g
How did they get created?
m
they created it using the site
g
email/password?
m
yes email and password
g
You probably want to send a support request if you have not already. Then look at the auth table directly in the dashboard table UI and see if anything obvious is different between the two. That assumes all Auth settings are exactly the same.
m
Send Magic Link is Working but having errors on reset password
For the support request is it creating an issue at the supabase repository?
g
No. The support tab in the UI
m
Found it. Thank you! 🙂
g
Do you have a trigger on the auth.users table?
m
No trigger on the auth.users table
g
OK, I'm out of ideas from the outside and it does not appear to be your code.
m
Thank you Gary. I have sent a Support Request now. I hope it will be fixed! 😊
g
You could also check the postgres logs under database tab, I guess
I was able to send reset emails from both my instances dashboard, so I think it is more specific to you (not that it helps you...)
m
@garyaustin found the issue, my email template had a syntax error and extra "<" and the error message being return wasn't about that. The supabase support team was able to assist me and they'll create an issue to improve the error message being returned. Thank you 😊
n
Thread was archived by @Michie. Anyone can send a message to unarchive it.