mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 19:44:09 +00:00
Add secure OAuth2-based mobile authentication
- Replace API keys with OAuth2 tokens for mobile apps - Add device tracking and management for mobile sessions - Implement 30-day token expiration with refresh tokens - Add MFA/2FA support for mobile login - Create dedicated auth endpoints (signup/login/refresh) - Skip CSRF protection for API endpoints - Return plaintext tokens (not hashed) in responses - Track devices with unique IDs and metadata - Enable seamless native mobile experience without OAuth redirects This provides enterprise-grade security for the iOS/Android apps while maintaining a completely native authentication flow. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,9 @@ class Api::V1::BaseController < ApplicationController
|
||||
# Skip regular session-based authentication for API
|
||||
skip_authentication
|
||||
|
||||
# Skip CSRF protection for API endpoints
|
||||
skip_before_action :verify_authenticity_token
|
||||
|
||||
# Skip onboarding requirements for API endpoints
|
||||
skip_before_action :require_onboarding_and_upgrade
|
||||
|
||||
|
||||
Reference in New Issue
Block a user