<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ldi-contributor</author_name>
  <author_url>https://blog.hatena.ne.jp/ldi-contributor/</author_url>
  <blog_title>ローソンデジタルイノベーション　テックブログ</blog_title>
  <blog_url>https://techblog.ldi.co.jp/</blog_url>
  <categories>
  </categories>
  <description>はじめに LDIで開発担当しているOKこと岡崎です。 普段はバックエンドの開発を主にやってますが、最近はWebのフロントエンドも学習しており、 今回はその一環で作ったところをテーマにブログに起こそうと思います。 本記事では、better-authを使ってメールOTPによる2要素認証を実装する際の課題と解決策を、実装コードとともに詳しく解説します。 本日のテーマ Next.js + TypeScriptで認証機能を実装する際、better-authは非常に便利なライブラリです。しかし、2要素認証（2FA）を実装しようとすると、公式ドキュメントだけでは実現できない課題に直面しました。 このため、b…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftechblog.ldi.co.jp%2Fentry%2F2025%2F11%2F07%2F114845&quot; title=&quot;better-authで実装する2要素認証（メールOTP） - ローソンデジタルイノベーション　テックブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-11-07 11:48:45</published>
  <title>better-authで実装する2要素認証（メールOTP）</title>
  <type>rich</type>
  <url>https://techblog.ldi.co.jp/entry/2025/11/07/114845</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
