SincereAuth sets up for you everything you need in your app and on the server to enable Sign in with Apple in your app. Apple has done a lot of nice stuff for us here. But there's still a lot to handle as an indie dev. SincereAuth handles for you or gives you a great open-source starting point to modify.
From an indie dev perspective, you could deploy this micro-service to a free-tier of hosting, while your main app runs on different provider. Or include in your Kubernetes deployment behind your load balancer. Ease of deployment for newcomers to DevOps is a priority.
- Postgres
- Redis
- Ability to run Docker images
I stream my contributions, which would include code, codereviews, writing tickets, and diagrams. My twitch username is FullQueueDeveloper & link is in my profile
Receive a login request and return an JWT that can be exchanged for a session JWT. Both of these are returned on an initial request. The JWT contains the roles that user is authorized for, stored in Postgres
Looking to support Sign in with Apple and Sign in with Google to start, since those are the two biggest mobile OS's at the moment. Support login from an iOS/Mac/Android app as well as a website.
Other features
- Apple server notifications
- Google equivalent (if available)
- unit tests
- Vapor queues to run cleanup tasks, or ping apple Future maybes handle in app purchases as well? Since most likely, we would want the JWT to include the current subscription tiers.
- Docker container
- Helm chart
- Vapor SDK for other microservices to consume the JWTs (optional)
- iOS client SDK (optional)
- Android client SDK (optional)
- JS SDK (optional)
If you learn anything or make a few bucks from this repo, please sponsor me on GitHub. https://github.com/sponsors/DanielSincere/
A huge thank you to the following for keeping the dream alive! 💜🗽
MIT
These are suggestions. Of course it is completely customizable to your taste.
-
Install Postgres and Redis.
brew install postgresql redis
-
Copy
.env.sample
to.env
, and.env.testing.sample
to.env.testing
-
Create local development and test databases
spx local-postgres create
-
Run migrations
swift run SincereAuthServer migrate -y
-
Run the tests
swift test
-
Create bundle ID on https://developer.apple.com/account > "Certificates, Identifiers & Profiles" > "Identifiers"
-
Create a new app on https://appstoreconnect.apple.com/apps, selecting the bundle ID from step 1. Add "Sign in with Apple" capability.
-
Create a services key under https://developer.apple.com/account > "Certificates, Identifiers & Profiles" > "Keys". Be sure to enable "Sign in with Apple" by checking the checkbox next to it. Download the key store it in a safe place.
-
Create an account on a hosting provider of your choice. Continue following directions in one the deployment-specific READMEs.