feat(auth): iOS 애플 로그인 버튼 — Sign in with Apple(App Store 4.8 대응)
- @capacitor-community/apple-sign-in + LoginModal Apple 버튼(iOS 전용, HIG 검은 버튼) - appleAuth 네이티브 래퍼 + authApi/auth store appleLogin - SPM capacitor-swift-pm 8.x 로 패치(patch-package) — @capawesome 구글 플러그인과 iOS 공존 - App.entitlements(applesignin) 준비 — Xcode 'Sign in with Apple' Capability 추가 시 사용 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+9
-1
@@ -77,6 +77,14 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
await persist()
|
||||
return res
|
||||
}
|
||||
async function appleLogin(identityToken, name, rememberMe = true) {
|
||||
const res = await authApi.appleLogin({ identityToken, name, rememberMe })
|
||||
token.value = res.token
|
||||
user.value = res.member
|
||||
exitDemo()
|
||||
await persist()
|
||||
return res
|
||||
}
|
||||
|
||||
async function signup(payload) {
|
||||
return authApi.signup(payload)
|
||||
@@ -123,7 +131,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
await persist()
|
||||
}
|
||||
|
||||
return { token, user, ready, isAuthenticated, isAdmin, isPremium, restore, login, googleLogin, signup, fetchMe, applyUser, refreshProfile, logout, clear }
|
||||
return { token, user, ready, isAuthenticated, isAdmin, isPremium, restore, login, googleLogin, appleLogin, signup, fetchMe, applyUser, refreshProfile, logout, clear }
|
||||
})
|
||||
|
||||
function safeParse(value) {
|
||||
|
||||
Reference in New Issue
Block a user