DEV Community

Cover image for How to use Password Reset API in Supabase Auth with the help of nextjs?
Next Dev
Next Dev

Posted on

3

How to use Password Reset API in Supabase Auth with the help of nextjs?

Hi ๐Ÿ‘‹ brothers and sisters, in this blog, I would tell you how you can use the password reset in supabase auth API.

๐ŸŒ‹๐ŸŒ‹๐ŸŒ‹Firstly, you need to implement the basic supabase in nextjs.

After you have implemented auth in your next js app.

Then you need to make a reset.jsx in your pages folder. This file will be the route for the user to submit the email and click the button to send a password recovery email. Then paste this ๐Ÿ‘‡ code.


Now, we have to make our password-reset.jsx file in pages folder.

Now you can actually change your password by ๐Ÿ‘‡:
  1. Go tohttp://localhost:3000/reset#

  2. Then submit your email

  3. Then go to Gmail or where you will receive an email (from noreply)

  4. Then click on the link provided by supabase

  5. Then give your new password

If you have faced any error or difficulty, feel free to put questions here:
Join the Next Dev's server Discord Server!

Congratulations ๐Ÿค“๐Ÿค“!!!!

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where youโ€™ll build it, break it, debug it, and fix it. Youโ€™ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good olโ€™ AI to find and fix issues fast.

RSVP here โ†’

Top comments (2)

Collapse
 
subirats345 profile image
Joan Subirats Llaveria โ€ข

wtf

Collapse
 
andreasjacobsen_5 profile image
Andreas Jacobsen โ€ข

This has to be the worst and most useless article I have ever seen on this site. Even if the password-reset.jsx file had been shown (it is not) the actual text is near useless.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay