Apple
Apple 로그인(Sign in with Apple)을 사용하면 사용자가 Apple ID로 tinyauth에 로그인할 수 있어요. 이 가이드는 Apple Developer에서 서비스를 등록하고 tinyauth에 연동하는 방법을 설명해요.
1. Apple Developer 설정
섹션 제목: “1. Apple Developer 설정”- Apple Developer에 접속하여 로그인해요.
- Certificates, Identifiers & Profiles로 이동해요.
- Identifiers에서 새로운 App ID를 등록해요. Sign in with Apple 기능을 활성화해요.
- Identifiers에서 새로운 Services ID를 등록해요:
- 이 Services ID의 Identifier가
client_id가 돼요. - Sign in with Apple을 활성화하고 Configure를 클릭해요.
- Domains and Subdomains에 도메인을 추가해요 (예:
auth.example.com). - Return URLs에 콜백 URL을 추가해요:
https://내_도메인.com/api/oauth/apple/callback
- 이 Services ID의 Identifier가
- Keys에서 새로운 키를 만들고 Sign in with Apple을 활성화해요. 다운로드한
.p8파일과 Key ID를 안전하게 보관해요.
2. Tinyauth 설정
섹션 제목: “2. Tinyauth 설정”Apple Developer에서 준비한 자격증명을 config.yaml에 설정해요.
identity_providers: - id: apple type: apple enabled: true client_id: com.example.auth client_secret: ${APPLE_CLIENT_SECRET}id: 이 제공자의 고유 식별자예요. 콜백 URL에 사용돼요.type:apple로 지정해요.client_id: Apple Developer에서 등록한 Services ID의 Identifier예요.client_secret: 생성한 JWT client secret이에요.
tinyauth를 https://auth.example.com에서 운영하는 경우의 전체 설정 예시예요.
server: public_origin: https://auth.example.com
identity_providers: - id: apple type: apple enabled: true client_id: com.example.auth client_secret: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...이 경우 Apple Developer의 Return URL은 다음과 같이 설정해야 해요.
https://auth.example.com/api/oauth/apple/callback