Rails Devise Multistep Signup Resend Email

Rails 8 + Devise Multi-Step Signup & Resend Email Debugging

This documents the problems encountered while integrating role-based multi-step signup and the Resend email service on a Rails 8 + Inertia.js + Svelte 5 stack. 1. Role-Based Conditional Multi-Step Signup Form Requirements In a service with two user roles, the signup flow needed to differ: Role A: Basic info -> Work selection -> Organization info (3 steps) Role B: Basic info -> Work selection (2 steps, organization info unnecessary) Implementing Conditional Steps with Svelte 5 Runes Used $derived to dynamically handle total step count and button behavior based on role. ...

2025-12-20 · 4 min read · Seunghan
Rails Denormalized Cache Vs Count Query

Rails Denormalized Cache Column vs COUNT Query Mismatch: When Seed Data Creates 0%

I inserted demo seed data directly into a Rails app, and all percentages showed as 0% on the screen. Server logs were clean, the data was clearly in the DB, yet the numbers would not appear. Situation This was a Rails app with a voting feature. There is a screen showing vote counts per choice, calculating percentages against total votes and displaying them with progress bars and numbers. I needed to show a demo, so I fetched real-time data from an external API and inserted it as seed data. The approach was simple: ...

2025-12-16 · 4 min read · Seunghan
Crypto Exchange Api Integration Lessons

Lessons from Integrating 5 Cryptocurrency Exchange APIs

Notes on the problems encountered while building a funding rate collection feature from multiple cryptocurrency exchanges in Ruby on Rails. Each of the 5 exchanges had different API behavior, and in some cases the official documentation didn’t match the actual behavior. Building a Common Base Client for Exchange APIs Before connecting multiple exchanges, I built a common HTTP client first. Used Faraday with retry and Circuit Breaker logic centralized here. ...

2025-12-06 · 7 min read · Seunghan
Api Response Wrapper Token Parsing Debug

Login Keeps Logging Out — Chain Bugs Caused by API Wrapper Format Mismatch

The mobile app keeps logging out. It works fine right after login, but when you background the app briefly and reopen it, the login screen appears. Token storage in SecureStorage was verified, and 401 auto-refresh via Dio interceptor was implemented. So why? Reproducing the Symptom Login to app -> works normally Restart app around access token expiration time -> Session restore fails, forced logout Found a hint in the server logs. ...

2025-12-02 · 5 min read · Seunghan
Spa Blank Screen Inertia Usepage Url Debugging

SPA Blank Screen After Deploy: Inertia.js usePage().url is a String

Rails + Inertia.js + Svelte 앱을 배포한 뒤 접속하면 완전히 빈 화면만 보였다. 서버는 정상이고 에셋도 다 로드되는데 화면이 안 그려지는 상황. 원인 추적부터 해결까지 정리한다. Symptoms 배포된 URL 접속 시 빈 화면 (흰색 배경만 표시) 로컬 개발 서버에서는 정상 동작 아무런 에러 페이지 없이 그냥 빈 화면 진단 과정 Step 1: HTTP 응답 확인 curl -s -o /dev/null -w "%{http_code}" https://example.com/ # 200 HTTP 200 OK. 서버 자체는 정상 응답 중이다. ...

2025-11-22 · 3 min read · Seunghan
Rails Inertia Svelte Pet Avatar Image Color

Rails + Inertia + Svelte 5: Avatar Image/Color Selection Feature Implementation Struggles

This documents the problems encountered while implementing a pet profile avatar selection feature (image or color) on a Rails 8 + Inertia.js + Svelte 5 stack. Problem 1: Colors Were Not Stored in the DB Symptoms Looking at the initial code, pet card colors were displayed like this: const PET_COLORS = ['#f3caa1', '#b7ddf9', '#d3c8ff', '#c5d5f4', '#ffd9aa'] function petColor(index: number): string { return PET_COLORS[index % PET_COLORS.length] } Colors were determined by the order (index) in which pets were created. Since colors were not stored in the DB at all, even if a user changed a color, it would revert to the original on refresh. ...

2025-11-15 · 4 min read · Seunghan
Rails8 Deploy Lessons

5 Issues from First Rails 8 Deployment: Security, Migration, Compatibility

Rails 8 프로젝트를 처음 클라우드 서비스에 배포하면서 하루 동안 연속으로 5가지 문제를 만났다. 각각 독립적인 문제처럼 보였지만, 하나를 고치면 다음 문제가 드러나는 패턴이었다. 기록으로 남긴다. 1. 공개 저장소에 민감한 파일이 들어간 경우 Symptoms git log --all --full-history -- config/secrets.yml 같은 명령으로 확인해보면, 예전 커밋에 secret_key_base가 하드코딩된 파일, 앱 서명 키스토어 파일 등이 포함되어 있다. Solution: git filter-repo로 히스토리에서 완전 삭제 pip install git-filter-repo # 특정 파일들을 히스토리 전체에서 제거 git filter-repo --path config/secrets.yml --invert-paths git filter-repo --path app-release.keystore --invert-paths # 강제 푸시 git push origin main --force 주의: --force 는 팀 작업 중이라면 사전 공지 필수. 모든 팀원이 re-clone해야 한다. ...

2025-11-11 · 4 min read · Seunghan
Apple Sso 403 Email Verified Type Mismatch

Apple Sign-In 403 Error: email_verified Type Mismatch and 3 Copy-Paste Bugs

Apple Sign-In was failing with 403 Forbidden while Google Sign-In worked perfectly fine. Since Apple login worked correctly in another project using the same stack (Rails 8 + Flutter), I did a comparative analysis. Symptoms Apple login: 403 Forbidden Google login: works fine Error message: "Email not verified by Apple" Cause 1: email_verified Type Mismatch (Core Issue) Apple and Google return the email_verified field in JWT with different types. Provider email_verified type Example value Google boolean true Apple string or boolean "true" or true The problematic code: ...

2025-10-25 · 3 min read · Seunghan
Rails Missing Migration Sessions Table

Production DB Missing Table: schema.rb and Migration File Mismatch Incident

I received a report that sign-up and login were completely broken. The app just repeated “An unexpected error occurred.” Symptoms Sign-up attempt -> 500 Internal Server Error Login attempt -> same 500 Health check API -> 200 OK, DB connection normal The server was alive and DB was connected, but all authentication features were dead. Investigation Process Step 1: Check Server Status SSH in and check the Rails environment. rails runner "puts Rails.env" # => production rails runner "puts User.count" # => 13 Server normal, DB connection normal, user data exists. ...

2025-10-18 · 5 min read · Seunghan
Rails Flutter Server Health Check 4 Issues

Rails + Flutter App Server Health Check: 4 Issues Found and Fixed at Once

After uploading a test build of the app and running it myself, 4 things broke simultaneously. Google login failure, AI itinerary generation returning wrong results, app crash on tapping the notification button, and the popular destinations section completely empty. Here is the process of finding and fixing each cause. 1. Google SSO Fails While Apple Login Succeeds Symptoms Apple Sign-In works normally but Google Sign-In returns a 500 error. The client only shows a login failure toast. ...

2025-10-15 · 6 min read · Seunghan
Privacy Policy Terms Disclaimer Contact