Add Apple authentication to your app
You can let users log in using their Apple accounts without writing custom login code. Lovable can handle the setup automatically, or you can connect your own Apple Developer account.
Anyone building an app with Lovable's built-in backend who wants to let people sign in with Apple.
Do this, in order
- 1
Ask Lovable in the project chat to add an Apple sign-in button to your app.
This automatically turns on Apple authentication in your user settings and puts the sign-in button on your login screen.
- 2
Click the new Sign in with Apple button in your app preview to complete a test login.
This confirms that Apple redirects you back into your app properly and logs you in.
- 3
Open More, navigate to Users, and verify that your test account appears in the list.
Checking the user directory confirms that new accounts are actually being recorded in your database.
Paste this into your project
Add an Apple sign-in button to my app.
Words decoded
- OAuth
- A secure method that lets people log in to an app using an existing account like Apple or Google without giving the app their password.
- Client secret (JWT)
- A digital security key you generate from Apple that proves your app is allowed to handle Apple sign-ins.
- Private relay address
- A temporary or masked email address Apple creates for a user so they do not have to share their real personal email with your app.
Where people get stuck
- Switching between Lovable-managed mode and your own Apple developer credentials later will cause existing Apple users not to be recognized, because Apple assigns different IDs per developer team.
- If you provide your own Apple credentials, your client secret token expires every 6 months and must be manually refreshed, or user sign-ins will break.
- When using your own credentials, failing to copy Lovable's exact Redirect URLs into the Apple Developer portal will cause redirect errors during login.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.