Reset password supabase

Hello

I need help setting up password reset in subbase. Not sure what to fill in the “Email Templante”.
When I test it I get this error

{“message”:“No API key found in request”,“hint”:“No apikey request header or url param was found.”}

Did you solved it? I’m having the same question.

Hello :wave:

You can but don’t need to change anything in the Supabase email template.

Can you show us how things are configured on the WeWeb side of things?

Are you using the Supabase Auth plugin in WeWeb?

Hey Joyce, yes I have the Auth Supabase plugin installed. I see the workflow “change password” I assume that’s the one.

I’m not sure how should I build the reset password page? I have these 2 questions if you can help me please:
-The page should have a particular URL path?
-what inputs and/or workflows should have?

1 Like

Ok cool.

The page doesn’t need to have a specific URL path. Check out the step by step guide here: Supabase authentication | WeWeb documentation

I’ll be recording a video on the topic but most likely only tomorrow or Friday :slight_smile:

2 Likes

Awesome thank you! That helped me a lot

1 Like

Greetings @Joyce or anyone in the community that can shed some lights on user request to reset password on Supabase Auth. I got to the point where the email is received and password can be changed. Now, how can I prevent users from calling the change-password page from the URL as the page is public?
Thank you

Hi @sleeusis :wave:

I’m sorry, I don’t understand the question. What is your concern?

My concern is that https:\www.mydomain\change-password is accessible by typing the url. I know it won’t do anything if the token is invalid, etc but still the page shows. I can always add some JS to prevent it from showing but was wondering if there were some other more elegant way to do this

You can add a page workflow to redirect the user to a different page, with a pass-through condition based on if the user is not logged in

That is what I did before but rather than using a pass-through I used a custom JS to check on authenticated user, process errors and ion nvalid calls then show a message redir to main page. But I was wondering if there was a weweb builtin way to do this. I guessed this will have to do.
Thank you for your reply

1 Like

You can make your page private, it’s built-in

Sorry, maybe I misunderstood and you don’t want an authenticated user to access the page ?

this is for the change-password page that will be called from a valid password reset request link in the email sent by Supabase. I believe the page needs to be set public. It is fine as I have it working via a custom js on the onload workflow. Thanks anyway

1 Like