Skip to content

Add apple sso continue button - #141

Open
romanivan-flamingo wants to merge 3 commits into
mainfrom
hotfix/apple-sso-continue-button
Open

Add apple sso continue button#141
romanivan-flamingo wants to merge 3 commits into
mainfrom
hotfix/apple-sso-continue-button

Conversation

@romanivan-flamingo

@romanivan-flamingo romanivan-flamingo commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added Apple single sign-on support for login, registration, and invitation acceptance.
    • Apple sign-on options now appear on supported Apple devices when available.
    • Google and Microsoft sign-on options remain supported.
  • Bug Fixes
    • Improved provider filtering to prevent unsupported Apple options from appearing on non-Apple devices.
    • Updated authentication flows to correctly accept Apple sign-on requests.

romanivan-flamingo and others added 2 commits August 6, 2026 21:01
Renders the apple SSO provider on the login, signup and invite screens,
gated to Apple devices only (iOS Capacitor shell via mobilePlatform(),
otherwise Mac/iPhone/iPad user agents) through the new isApplePlatform()
predicate and its hydration-safe useIsApplePlatform() hook. Clickability
still follows the provider list the backend returns, same as Google and
Microsoft. Needs the core-lib AuthSsoProvider 'apple' support
(hotfix/apple-sso-auth-forms in openframe-oss-lib).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@romanivan-flamingo romanivan-flamingo self-assigned this Aug 7, 2026
@romanivan-flamingo
romanivan-flamingo requested review from a team as code owners August 7, 2026 07:08
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Apple SSO support was added to shared authentication contracts and to login, signup, registration, and invitation flows. Apple providers are detected and exposed only on Apple platforms. The platform check is hydration-safe.

Changes

Apple SSO authentication

Layer / File(s) Summary
Platform detection and provider contracts
package.json, src/lib/platform.ts, src/app/hooks/use-apple-platform.ts, src/lib/auth-api-client.ts, src/app/(auth)/auth/hooks/use-auth.ts
The frontend core dependency was updated. Apple platform detection and hydration-safe React state were added. Organization registration and invitation SSO contracts now accept apple.
Login and registration provider filtering
src/app/(auth)/auth/pages/login-page.tsx, src/app/(auth)/auth/pages/auth-page.tsx, src/app/(auth)/auth/pages/signup-page.tsx
Login, registration, and signup now map Apple, show it only on Apple platforms when supported by the backend, and reject only the internal openframe provider.
Invitation SSO provider handling
src/app/(auth)/auth/invite/page.tsx
The invitation flow maps Apple, filters it by Apple platform availability, and accepts mapped providers other than openframe.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: oleksandr-blip

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant LoginPage
  participant useIsApplePlatform
  participant Backend
  Browser->>LoginPage: open login page
  LoginPage->>useIsApplePlatform: read platform state
  useIsApplePlatform-->>LoginPage: return Apple platform boolean
  LoginPage->>Backend: request available SSO providers
  Backend-->>LoginPage: return configured providers
  LoginPage-->>Browser: render filtered SSO providers
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title identifies Apple SSO, which is the main feature, but it describes the change narrowly as a continue button.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/apple-sso-continue-button

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/lib/platform.ts (1)

82-93: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add regression coverage for all Apple-platform branches.

This helper controls whether the Apple SSO button is rendered. Test SSR, Capacitor iOS, Capacitor Android, macOS, iOS/iPadOS user agents, and a non-Apple user agent.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/lib/platform.ts` around lines 82 - 93, Add regression tests for
isApplePlatform covering SSR, Capacitor iOS, Capacitor Android, macOS,
iOS/iPadOS user agents, and a non-Apple user agent. Mock the relevant window,
user-agent, isMobileShell, and mobilePlatform conditions so both the
mobile-shell and browser branches return the expected boolean values.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/lib/platform.ts`:
- Around line 82-93: Add regression tests for isApplePlatform covering SSR,
Capacitor iOS, Capacitor Android, macOS, iOS/iPadOS user agents, and a non-Apple
user agent. Mock the relevant window, user-agent, isMobileShell, and
mobilePlatform conditions so both the mobile-shell and browser branches return
the expected boolean values.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 82c8680c-fb8b-49c0-92a8-b89b16e2e8be

📥 Commits

Reviewing files that changed from the base of the PR and between f4246d8 and bfaa9e6.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • package.json
  • src/app/(auth)/auth/hooks/use-auth.ts
  • src/app/(auth)/auth/invite/page.tsx
  • src/app/(auth)/auth/pages/auth-page.tsx
  • src/app/(auth)/auth/pages/login-page.tsx
  • src/app/(auth)/auth/pages/signup-page.tsx
  • src/app/hooks/use-apple-platform.ts
  • src/lib/auth-api-client.ts
  • src/lib/platform.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants