MojoAuth's Flutter SDK workspace for native iOS social authentication.
Current native provider support:
- Google Sign-In
- Facebook Login
- Sign in with Apple
Current gap:
- OIDC / AppAuth flow is scaffolded but not implemented yet
packages/mojoauth_platform_interfaceShared models, errors, and platform contractspackages/mojoauth_flutterFlutter-facing SDK APIpackages/mojoauth_iosNative iOS implementationapps/mojoauth_demoDemo app for QA, customer onboarding, and local validation
Install dependencies and run the demo:
cd apps/mojoauth_demo
flutter pub get
flutter runThe demo app reads configuration from --dart-define values so real credentials do not need to live in source control.
Example:
flutter run \
--dart-define=MOJOAUTH_API_BASE_URL=https://api.mojoauth.com \
--dart-define=MOJOAUTH_API_KEY=replace-with-mojoauth-api-key \
--dart-define=MOJOAUTH_IOS_BUNDLE_ID=com.mojoauth.demo \
--dart-define=MOJOAUTH_GOOGLE_CLIENT_ID=replace-with-google-ios-client-id \
--dart-define=MOJOAUTH_FACEBOOK_APP_ID=replace-with-facebook-app-id \
--dart-define=MOJOAUTH_FACEBOOK_CLIENT_TOKEN=replace-with-facebook-client-token \
--dart-define=MOJOAUTH_FACEBOOK_DISPLAY_NAME="MojoAuth Demo"Optional OIDC values:
--dart-define=MOJOAUTH_CLIENT_ID=replace-with-client-id
--dart-define=MOJOAUTH_REDIRECT_URI=com.mojoauth.demo:/callback
--dart-define=MOJOAUTH_ISSUER=https://api.mojoauth.com/.well-known/openid-configuration
--dart-define=MOJOAUTH_GOOGLE_SERVER_CLIENT_ID=replace-with-google-web-client-id
--dart-define=MOJOAUTH_GOOGLE_HOSTED_DOMAIN=example.comUpdate apps/mojoauth_demo/ios/Runner/Info.plist before testing native providers:
- Google:
add the reversed Google iOS client ID under
CFBundleURLSchemes - Facebook:
replace
replace-with-facebook-app-idandreplace-with-facebook-client-token - Apple:
enable the
Sign in with Applecapability for the app target
Google native login:
- MojoAuth route:
GET /users/social/google - request value:
google_access_token=<google_id_token> - the Google JWT
audmust match one of the configured Google client IDs for the project
Facebook native login:
- MojoAuth route:
GET /users/social/facebook - request value:
fb_access_token=<facebook_access_token>
Apple native login:
- MojoAuth route:
POST /users/social/apple - request body: Apple authorization code plus native identity token
- Do not commit real API keys, provider client tokens, or test customer credentials
- Do not log raw Apple authorization codes or identity tokens in production builds
- Keep provider secrets in MojoAuth backend configuration, not in the Flutter app
Recommended checks before a release:
cd packages/mojoauth_platform_interface && flutter analyze && flutter test
cd ../mojoauth_flutter && flutter analyze && flutter test
cd ../mojoauth_ios && flutter analyze && flutter test
cd ../../apps/mojoauth_demo && flutter analyze && flutter testBefore publishing this repository publicly:
- replace all placeholder native app values in the demo when doing manual testing
- keep placeholder values in committed source
- remove local build output and
.dart_tooldirectories - confirm Apple, Google, and Facebook setup steps in the customer documentation