Hosted UI is not native
Cognito’s default social path opens a web view or Safari redirect. Users expect ASAuthorizationController — the system Apple sheet.
Pro · Native social auth
The pain point every iOS + AWS developer hits: Cognito docs push web OAuth, but your users expect the system Apple button. Pro ships the full native path — custom auth, token refresh, and the traps already solved.
Developers have asked for a native Sign in with Apple experience with Cognito User Pools for years — without Hosted UI and without guessing whether user creation still works. The official paths still push federated IdP setup, redirect URLs, and Amplify flows that fight a SwiftUI app.
The problem
Cognito’s default social path opens a web view or Safari redirect. Users expect ASAuthorizationController — the system Apple sheet.
Console wiring for team keys, Services IDs, return URLs, and Cognito’s Apple identity provider — easy to misconfigure and hard to debug.
Your API Gateway authorizer expects Cognito id tokens. Passing Apple’s identity token directly gives you 401s after a “successful” login.
Many pools use email as username. Apple’s stable id is sub — not a valid email-shaped Cognito username without a deliberate mapping strategy.
Native sign-in bypasses Amplify sign-in. Without a token store and refresh flow, sessions die when the id token expires (~1 hour).
Pro approach
Apple: ASAuthorizationController. Google: GIDSignIn. Users never leave your app for a Cognito web page.
CDK deploys Cognito custom auth Lambda triggers + POST /auth/apple and /auth/google. Apple works when your Xcode bundle ID matches — no Apple IdP in the Cognito console.
Go Lambda runs AdminInitiateAuth + custom challenge. Triggers validate the Apple/Google JWT (JWKS, sub, bundle/client id). Response: standard Cognito id, access, and refresh tokens.
iOS stores tokens in Keychain, refreshes silently, revokes on sign-out. GET /me and /todos use the same Bearer JWT flow as password sign-in.
Compare
| Usual Cognito path | MVP Stack Pro |
|---|---|
| Cognito Hosted UI + redirect URLs | Native Apple / Google sheets in SwiftUI |
| Configure Apple IdP in Cognito console | Custom auth triggers — deploy and match bundle ID |
| Amplify federated sign-in assumptions | CognitoTokenStore + REFRESH_TOKEN_AUTH refresh |
| Forum threads on “does native Apple bypass user creation?” | SignUp + custom auth documented — one path for sign-up and sign-in |
| Profile shows @users.signin.apple usernames | Real name/email display pattern included |
FAQ
Common questions from iOS developers integrating social login with User Pools.
Full implementation guides ship inside the Pro zip — docs/SIGN_IN_WITH_APPLE_COGNITO.md, docs/GOOGLE_SIGN_IN_WITH_COGNITO.md
Clone the core tonight. Pro is $199 one-time; add Continuity if you want updates and repo access.
MIT core on GitHub → START_HERE.md → deploy in ~45 min