# Replenysh uses Supabase to implement OTP in less than 24-hours

[Supabase](https://yomu.fyi/company/supabase) · Oct 19, 2021

**Type:** Problem & solution

## Summary

Replenysh builds infrastructure connecting brands with local communities to track, monetize, and recover used packaging and materials. The engineering team previously maintained their own backend infrastructure, pairing custom Twilio and password authentication with a Haskell server and a Postgres database on Heroku. Seeking to accelerate development velocity and minimize ongoing DevOps maintenance during a codebase refactor, Replenysh required an alternative backend platform that preserved relational Postgres and Row Level Security. The team selected Supabase over alternatives like Firebase because it provided native Row Level Security alongside built-in authentication tooling. By adopting Supabase Auth, Replenysh successfully implemented an SMS one-time password system in less than 24 hours before deploying their mobile application to production.

## Context

Replenysh connects brands with communities to recover materials, requiring reliable mobile-first authentication for global brand users. The team historically managed custom APIs, Twilio OTP, password auth, and a Haskell server with Postgres on Heroku. During a major refactor, they sought alternative hosting to speed up development and reduce DevOps maintenance without losing Postgres and Row Level Security.

## Approach / What changed

Replenysh migrated from their Heroku-hosted Haskell and Postgres backend to Supabase. They adopted Supabase Auth to implement SMS one-time password authentication while preserving their relational Postgres database and Row Level Security policies.

## Takeaways

- Replenysh completed and pushed live their SMS OTP authentication implementation in less than 24 hours using Supabase Auth.
- Firebase was evaluated for rapid startup, but Replenysh rejected it to maintain a relational database with Postgres Row Level Security.
- Prior to adopting Supabase, Replenysh operated custom OTP and password authentication using Twilio, a Haskell server, and Postgres on Heroku.

**Tags:** [Authentication](https://yomu.fyi/topic/authentication), [Migrations](https://yomu.fyi/topic/migration), [Postgres](https://yomu.fyi/topic/postgres), [Refactoring](https://yomu.fyi/topic/refactoring)

[Read original post](https://supabase.com/blog/replenysh-time-to-value-in-less-than-24-hours)
