What problem does it solve?
It prevents duplicated native login work by reusing your existing Rails authentication UI and logic inside Hotwire Native iOS and Android apps, so sign-in and sign-out behave consistently across web and mobile.
Core Features & Use Cases
- Reuses Rails session pages: Use the existing
/session/new form (no extra native login UI, no new JSON auth endpoints).
- Bridges auth state to native navigation: Sends
signIn/signOut from a Stimulus bridge to iOS/Android components that toggle tab visibility and screen stacks.
- Implements persistent cookie authentication: Uses
cookies.signed.permanent for a long-lived session_token so the native app can resume authenticated state reliably.
- Use case: You want a Hotwire Native app where “Posts” and “My Profile” only appear after login, while “Sign In” is shown until authenticated, using the same Rails controllers and views.
Quick Start
Set up Rails cookie-based session persistence, add the bridge meta tag and authentication Stimulus controller, then register the iOS/Android authentication bridge components to toggle your tab bar based on the rendered server-side authenticated state.