Remove Apple SSO, keep Google + GitHub only
- Removed Apple from OAuth lib (config, exchange, provider type) - Removed Apple button from auth page - Removed Apple tab from setup guide page - Removed Apple env vars from .env, .env.example, docker-compose.yml - Removed Apple prompts from setup-sso.sh
This commit is contained in:
+7
-92
@@ -3,7 +3,7 @@
|
||||
import { useState } from 'react';
|
||||
|
||||
export default function SetupPage() {
|
||||
const [tab, setTab] = useState<'github' | 'google' | 'apple' | 'env'>('github');
|
||||
const [tab, setTab] = useState<'github' | 'google' | 'env'>('github');
|
||||
const [copied, setCopied] = useState('');
|
||||
|
||||
const copyToClipboard = (text: string, label: string) => {
|
||||
@@ -26,7 +26,6 @@ export default function SetupPage() {
|
||||
const tabs = [
|
||||
{ id: 'github' as const, label: 'GitHub', icon: '🐙' },
|
||||
{ id: 'google' as const, label: 'Google', icon: '🔵' },
|
||||
{ id: 'apple' as const, label: 'Apple', icon: '🍎' },
|
||||
{ id: 'env' as const, label: 'Apply', icon: '⚡' },
|
||||
];
|
||||
|
||||
@@ -44,7 +43,7 @@ export default function SetupPage() {
|
||||
⚡ SSO Setup Guide
|
||||
</h1>
|
||||
<p style={{ color: '#888', fontSize: '14px', marginBottom: '24px' }}>
|
||||
Create OAuth credentials for Google, Apple, and GitHub SSO.
|
||||
Create OAuth credentials for Google and GitHub SSO.
|
||||
Each takes ~5 minutes.
|
||||
</p>
|
||||
|
||||
@@ -219,79 +218,7 @@ export default function SetupPage() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Apple Tab */}
|
||||
{tab === 'apple' && (
|
||||
<div>
|
||||
<h2 style={{ fontSize: '18px', marginBottom: '16px', color: '#fff' }}>
|
||||
Set Up Sign In with Apple
|
||||
</h2>
|
||||
|
||||
<Step number={1} title="Go to Apple Developer">
|
||||
<CodeBlock
|
||||
text="https://developer.apple.com/account/resources/identifiers/list"
|
||||
label="Apple URL"
|
||||
copied={copied}
|
||||
onCopy={copyToClipboard}
|
||||
/>
|
||||
<p style={{ color: '#ff6b6b', fontSize: '13px', marginTop: '8px' }}>
|
||||
⚠️ Requires an Apple Developer account ($99/year).
|
||||
</p>
|
||||
</Step>
|
||||
|
||||
<Step number={2} title="Register a Service ID">
|
||||
<ul style={{ color: '#ccc', paddingLeft: '20px', lineHeight: 1.8 }}>
|
||||
<li>Click <strong>"+"</strong> → <strong>"Service IDs"</strong></li>
|
||||
<li>Description: <strong>FalahOS Auth</strong></li>
|
||||
<li>Identifier: <strong>com.falahos.auth</strong></li>
|
||||
<li>Click <strong>"Continue"</strong> → <strong>"Register"</strong></li>
|
||||
</ul>
|
||||
</Step>
|
||||
|
||||
<Step number={3} title="Enable Sign in with Apple">
|
||||
<ul style={{ color: '#ccc', paddingLeft: '20px', lineHeight: 1.8 }}>
|
||||
<li>Click on your new Service ID</li>
|
||||
<li>Check <strong>"Sign in with Apple"</strong> → <strong>"Configure"</strong></li>
|
||||
<li>Select <strong>"Use as default"</strong> or create a new Service</li>
|
||||
<li>Web Domain: <strong>falahos.my</strong></li>
|
||||
<li>Return URLs: <strong>https://falahos.my/mobile/api/auth/apple/callback</strong></li>
|
||||
<li>Click <strong>"Save"</strong></li>
|
||||
</ul>
|
||||
</Step>
|
||||
|
||||
<Step number={4} title="Create a Key">
|
||||
<ul style={{ color: '#ccc', paddingLeft: '20px', lineHeight: 1.8 }}>
|
||||
<li>Go to <strong>Keys</strong> → <strong>"+"</strong></li>
|
||||
<li>Select <strong>"Sign in with Apple"</strong></li>
|
||||
<li>Configure with your Service ID</li>
|
||||
<li>Download the <strong>.p8</strong> key file</li>
|
||||
<li>Note the <strong>Key ID</strong></li>
|
||||
</ul>
|
||||
</Step>
|
||||
|
||||
<Step number={5} title="Copy Values">
|
||||
<div style={{
|
||||
background: '#0d0d0d',
|
||||
border: '1px solid #333',
|
||||
borderRadius: '8px',
|
||||
padding: '12px',
|
||||
marginTop: '8px',
|
||||
}}>
|
||||
<div style={{ fontSize: '12px', color: '#888', marginBottom: '4px' }}>
|
||||
APPLE_CLIENT_ID=com.falahos.auth (your Service ID)
|
||||
</div>
|
||||
<div style={{ fontSize: '12px', color: '#888', marginBottom: '12px' }}>
|
||||
APPLE_CLIENT_SECRET= (generated JWT, not needed immediately)
|
||||
</div>
|
||||
<CopyButton
|
||||
text={`APPLE_CLIENT_ID="com.falahos.auth"\nAPPLE_CLIENT_SECRET=""`}
|
||||
label="apple-template"
|
||||
copied={copied}
|
||||
onCopy={copyToClipboard}
|
||||
/>
|
||||
</div>
|
||||
</Step>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Apply Tab */}
|
||||
{tab === 'env' && (
|
||||
@@ -320,12 +247,11 @@ export default function SetupPage() {
|
||||
✅ Quick Summary
|
||||
</h3>
|
||||
<p style={{ color: '#aaa', fontSize: '14px', lineHeight: 1.6 }}>
|
||||
After creating all 3 OAuth apps, you'll have:
|
||||
After creating both OAuth apps, you'll have:
|
||||
</p>
|
||||
<ul style={{ color: '#ccc', paddingLeft: '20px', lineHeight: 1.8 }}>
|
||||
<li>🐙 <strong>GitHub</strong>: Client ID + Secret</li>
|
||||
<li>🔵 <strong>Google</strong>: Client ID + Secret</li>
|
||||
<li>🍎 <strong>Apple</strong>: Service ID (Client ID) + Key</li>
|
||||
</ul>
|
||||
<p style={{ color: '#aaa', fontSize: '14px', marginTop: '8px', lineHeight: 1.6 }}>
|
||||
Contact me on Telegram with the values and I'll apply them instantly.
|
||||
@@ -473,14 +399,12 @@ function EnvForm() {
|
||||
const [ghSecret, setGhSecret] = useState('');
|
||||
const [glId, setGlId] = useState('');
|
||||
const [glSecret, setGlSecret] = useState('');
|
||||
const [apId, setApId] = useState('');
|
||||
const [apSecret, setApSecret] = useState('');
|
||||
const [submitted, setSubmitted] = useState(false);
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault();
|
||||
// Build the env var text for copying
|
||||
const text = `# Paste these into your VPS:\ncd /root/falah-mobile\ncat >> .env << 'EOF'\nGOOGLE_CLIENT_ID="${glId}"\nGOOGLE_CLIENT_SECRET="${glSecret}"\nAPPLE_CLIENT_ID="${apId}"\nAPPLE_CLIENT_SECRET="${apSecret}"\nGITHUB_CLIENT_ID="${ghId}"\nGITHUB_CLIENT_SECRET="${ghSecret}"\nEOF\ndocker compose up -d --build`;
|
||||
const text = `# Paste these into your VPS:\ncd /root/falah-mobile\ncat >> .env << 'EOF'\nGOOGLE_CLIENT_ID="${glId}"\nGOOGLE_CLIENT_SECRET="${glSecret}"\nGITHUB_CLIENT_ID="${ghId}"\nGITHUB_CLIENT_SECRET="${ghSecret}"\nEOF\ndocker compose up -d --build`;
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
setSubmitted(true);
|
||||
setTimeout(() => setSubmitted(false), 3000);
|
||||
@@ -511,20 +435,11 @@ function EnvForm() {
|
||||
<InputField label="Client Secret" value={glSecret} onChange={setGlSecret} placeholder="GOCSPX-xxxxxxxx" secret />
|
||||
</div>
|
||||
|
||||
<div style={{
|
||||
background: '#0d0d0d',
|
||||
border: '1px solid #333',
|
||||
borderRadius: '8px',
|
||||
padding: '12px',
|
||||
}}>
|
||||
<h4 style={{ color: '#fff', fontSize: '14px', marginBottom: '8px' }}>🍎 Apple</h4>
|
||||
<InputField label="Service ID (Client ID)" value={apId} onChange={setApId} placeholder="com.falahos.auth" />
|
||||
<InputField label="Client Secret (JWT)" value={apSecret} onChange={setApSecret} placeholder="(generated JWT)" secret />
|
||||
</div>
|
||||
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
disabled={!ghId && !glId && !apId}
|
||||
disabled={!ghId && !glId}
|
||||
style={{
|
||||
padding: '14px',
|
||||
borderRadius: '8px',
|
||||
@@ -534,7 +449,7 @@ function EnvForm() {
|
||||
fontSize: '15px',
|
||||
fontWeight: 700,
|
||||
cursor: 'pointer',
|
||||
opacity: (!ghId && !glId && !apId) ? 0.5 : 1,
|
||||
opacity: (!ghId && !glId) ? 0.5 : 1,
|
||||
transition: 'all 0.2s',
|
||||
}}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user