One-click install
npx skills add https://github.com/LaunchPadLab/ai-bank --skill hotwire-native-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hotwire-native-auth
Source: https://github.com/LaunchPadLab/ai-bank/tree/main/claude/skills/hotwire-native-auth
Command: npx skills add https://github.com/LaunchPadLab/ai-bank --skill hotwire-native-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about hotwire-native-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reuse Rails session authentication inside a Hotwire Native mobile app?

Rails cookie-based session authentication works in Hotwire Native webviews by using cookies.signed.permanent with a session_token mapping, allowing the native app to resume authenticated state reliably across sessions without needing separate JSON auth endpoints.

How do I toggle native tab navigation based on Rails webview sign-in state?

You can toggle native tab navigation by adding a layout meta bridge exposing the authenticated? state and a Stimulus bridge controller that emits signIn and signOut events to native bridge components, which then perform idempotent tab-stack switching to show or hide tabs like My Profile.

Do I need to build separate native login screens for Hotwire Native iOS and Android?

No, you do not need separate native login screens. This approach reuses your existing Rails session flows, such as the /session/new form, directly inside Hotwire Native webviews so sign-in and sign-out behave consistently across web and mobile platforms.

Can I use cookie sessions for persistent web authentication in a Hotwire Native webview?

Yes, cookie sessions work for persistent web authentication in Hotwire Native by configuring cookies.signed.permanent with a session_token mapping, which allows the native app to maintain a long-lived authenticated state and resume user sessions reliably.

What are the limitations of using web-based Rails authentication instead of native authentication in Hotwire Native?

Using web-based Rails authentication in Hotwire Native requires a webview for sign-in flows and depends on cookie session persistence, meaning native UI cannot fully control the login experience and tab-based navigation must react to server-side auth state changes.