Skip to content

Add social sign-in

ShipFlutter Auth module currently supports the following social sign-in providers:

  1. Google
  2. Apple

Each of them requires specific steps. You can easily enable/disable them by modifying the AuthController and enable them in a later stage. You can also add new ones yourself by implementing them in the controller.

final authController = Ref.scoped(
(context) => AuthController(
enabledSocials: [
AuthEvent.google,
AuthEvent.apple,
// ...
]
),
);

Make sure you have setup the auth module in the previous step to continue.

Google

Follow these steps to enable Google sign-in for Android, iOS and Web:

  1. Create a SHA1 key for your Android app

  2. Add to it to the Android app in the Project Settings (Add fingerprint)

  3. Enable Google Sign-in in the Firebase Project dashboard.

  4. Provide a name and a support email.

  5. (Optional) Provide an existing Web SDK configuration, otherwise it will be generated for you.

  6. Go back to your project and refresh the config:

    Terminal window
    flutterfire config
  7. (Only for iOS) Configure URL Schemes

    1. Open Project Configuration: Click on your project name in the left tree view.
    2. Select App Target: Choose your app from the “TARGETS” section.
    3. Go to Info Tab: Select the “Info” tab.
    4. Expand URL Types: Expand the “URL Types” section.
    5. Add URL Scheme: Click the ”+” button and add a new URL scheme.
    6. Use Reversed Client ID: Find the REVERSED_CLIENT_ID key in your GoogleService-Info.plist file and paste its value into the “URL Schemes” box.
  8. Try to run the app and sign-in with Google. It should work for Android, iOS and web.

Apple

We will provide better documentation in the future. For now follow the official Firebase documentation:

  1. Configure Sign In with Apple
  2. Enable Apple as a sign-in provider.
  3. Add “Sign in with Apple” capability.

Facebook

🚧 Work in progress. We will update it soon!