비트베이크

Replacing Expensive Twilio: Integrating Domestic SMS Auth in 5 Minutes with Supabase Custom SMS Hook

2026-04-11T01:01:29.963Z

developer security interface

Giving Up on SMS Auth Because of Paperwork?

If you're building a side project or a startup MVP with Supabase, you inevitably hit a wall: SMS Authentication (OTP).

While Supabase offers Twilio by default, sending SMS to South Korea via Twilio is notoriously expensive (often over $0.08 per message) and sometimes suffers from low delivery rates. If you turn to local Korean SMS APIs, you are immediately blocked by tedious paperwork—business registration certificates, proof of usage, and mandatory sender ID pre-registration.

In this article, we'll show you how to replace expensive Twilio and implement fast, cost-effective SMS authentication in just 5 minutes using EasyAuth and the Supabase Custom SMS Hook—with absolutely zero paperwork.


Why EasyAuth?

For solo developers and early-stage startups, navigating complex approval processes is a waste of precious time. EasyAuth is a developer-friendly, ultra-simple SMS API that offers the following benefits:

  • No Paperwork Required: Sign up and start using the API immediately without a business registration certificate.
  • Automatic Sender ID: Skip the annoying sender ID pre-registration process.
  • Reasonable Pricing: Only 15~25 KRW per message, significantly cheaper than Twilio or local competitors (30~50 KRW).
  • Free Trial: Get 10 free test messages the moment you sign up.

With just two endpoints (POST /send and POST /verify), integration is highly intuitive.


Supabase Custom SMS Hook Integration Guide

Supabase recently introduced Auth Hooks, allowing you to connect external SMS providers via the Send SMS Hook. Let's create an Edge Function to route Supabase's OTPs through the EasyAuth API.

Step 1: Create a Supabase Edge Function

First, use the Supabase CLI to create a new Edge Function.

supabase functions new send-sms-easyauth

Step 2: Write the Edge Function Code

Open the generated supabase/functions/send-sms-easyauth/index.ts file and add the following code. This logic receives the OTP generated by Supabase Auth and forwards it to EasyAuth's /send endpoint.

import { serve } from "https://deno.land/std@0.168.0/http/server.ts";

serve(async (req) => {
  try {
    // Payload provided by the Supabase Auth Hook
    const { user, sms } = await req.json();
    const { phone, otp } = sms;

    // Convert E.164 format (+821012345678) to Korean local format (01012345678)
    const formattedPhone = phone.replace('+82', '0');

    // Call EasyAuth API
    const response = await fetch("https://api.easyauth.io/send", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        "Authorization": `Bearer ${Deno.env.get("EASYAUTH_API_KEY")}`
      },
      body: JSON.stringify({
        phone: formattedPhone,
        code: otp // Pass the OTP generated by Supabase
      })
    });

    if (!response.ok) {
      throw new Error("EasyAuth SMS dispatch failed");
    }

    return new Response(JSON.stringify({ success: true }), {
      headers: { "Content-Type": "application/json" },
      status: 200,
    });
  } catch (error) {
    return new Response(JSON.stringify({ error: error.message }), {
      headers: { "Content-Type": "application/json" },
      status: 500,
    });
  }
});

Step 3: Set Secrets and Deploy

Register the API key obtained from EasyAuth as a Supabase environment variable (secret) and deploy the function.

supabase secrets set EASYAUTH_API_KEY="your_easyauth_api_key"
supabase functions deploy send-sms-easyauth

Step 4: Connect the Hook in Supabase Dashboard

  1. Navigate to your Supabase Dashboard.
  2. Go to Authentication > Hooks.
  3. Enable the Send SMS hook and select the send-sms-easyauth Edge Function you just deployed.

Step 5: Request Login from the Client

Now, simply call the Supabase Auth method from your frontend code as usual! Supabase will handle the OTP verification automatically.

const { data, error } = await supabase.auth.signInWithOtp({
  phone: '+821012345678',
});

Conclusion: Focus on Core Development

Authentication is crucial, but you shouldn't spend days implementing it or fighting with administrative red tape. Don't stress over submitting documents or registering sender IDs.

By combining Supabase with EasyAuth, which takes just 5 minutes to set up, you can build a secure, cost-effective (15~25 KRW/msg) SMS authentication system for everything from toy projects to startup MVPs.

Sign up for EasyAuth today and test it out yourself using the 10 free credits provided upon registration!

비트베이크에서 광고를 시작해보세요

광고 문의하기

다른 글 보기

2026-06-18T06:01:39.386Z

2026년 부동산: 청약 대출 금리 전망과 성공적인 내집마련 전략

2026년 부동산 시장은 금리, 정책, 공급 등 다양한 변수로 인해 복잡합니다. 이 글에서는 2026년 상반기 부동산 시장 전망과 함께 정부 정책 변화, 주택담보대출 금리 최적화 전략, 그리고 성공적인 청약 당첨을 위한 지역 및 단지 선택 팁을 상세히 다룹니다. 현명한 내집마련 의사결정을 위한 실질적인 가이드를 제공합니다.

2026-06-18T05:01:46.246Z

AI 웨어러블 건강 최적화 2026: 나만의 맞춤 로드맵

2026년, AI 웨어러블 기기가 선사할 개인 맞춤 건강 관리의 혁신을 소개합니다. AI 코칭으로 최적화된 영양, 운동, 수면 관리와 예측 예방 전략으로 나만의 건강 로드맵을 설계하세요.

2026-06-18T05:01:38.929Z

2026 여름 출산준비물 리스트: 신생아부터 첫 휴가까지 필수템!

2026년 여름 출산을 앞둔 예비 부모를 위한 완벽 가이드! 신생아 여름용품부터 첫 휴가를 위한 필수템까지, 더위로부터 아기를 보호할 쿨링 아이템과 외출/휴가용품, 여름 의류를 상세히 소개합니다. 육아 선배들의 꿀팁과 체크리스트로 현명한 여름 출산준비를 시작하세요.

2026-06-18T05:01:32.846Z

2026년 AI PC 구매 가이드: 나에게 맞는 인공지능 노트북은?

2026년 AI PC 시대, NPU 기반 인공지능 노트북 구매를 위한 완벽 가이드! 코파일럿+ 핵심 기능부터 인텔, AMD, 퀄컴 제조사별 라인업 비교, 예산 및 용도별 추천 모델까지, 나에게 맞는 최신 AI PC를 현명하게 선택하는 방법을 알아보세요.

서비스

피드자주 묻는 질문고객센터

문의

비트베이크

레임스튜디오 | 사업자 등록번호 : 542-40-01042

경기도 남양주시 와부읍 수례로 116번길 16, 4층 402-제이270호

트위터인스타그램네이버 블로그