firebase_dart_flutter_auth_google 0.1.0+5 copy "firebase_dart_flutter_auth_google: ^0.1.0+5" to clipboard
firebase_dart_flutter_auth_google: ^0.1.0+5 copied to clipboard

Provides a `firebase_dart` auth handler for sign in with Google using the native Google API

Ceasefire Now

Provides a firebase_dart handler for sign in with Google using the native Google API.

Usage #

Initialize FirebaseDartFlutter with the auth handler.

await FirebaseDartFlutter.setup(
    socialAuthHandlers: [
        GoogleAuthHandler(),
    ],
);

Start sign in process:

await auth.signInWithPopup(GoogleAuthProvider());

iOS and MacOS integration #

Make sure you provide a iosClientId when initializing the app. This can be copied from the GoogleService-Info.plist key CLIENT_ID.

var app = await Firebase.initializeApp(options: FirebaseOptions(
    ...,
    iosClientId: '[YOUR IOS CLIENT ID]'
));

Add the CFBundleURLTypes to the Info.plist file in the ios/Runner or macos/Runner directory.

<key>CFBundleURLTypes</key>
<array>
	<dict>
		<key>CFBundleTypeRole</key>
		<string>Editor</string>
		<key>CFBundleURLSchemes</key>
		<array>
			<string>[YOUR REVERSED_CLIENT_ID FROM GoogleService-Info.plist]</string>
		</array>
	</dict>
</array>

See also: https://pub.flutter-io.cn/packages/google_sign_in_ios

Android integration #

No additional configuration required.

See also: https://pub.flutter-io.cn/packages/google_sign_in_android

Web integration #

On web, will fall back to default auth handler.

0
likes
130
points
11
downloads

Publisher

unverified uploader

Weekly Downloads

Provides a `firebase_dart` auth handler for sign in with Google using the native Google API

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

firebase_dart, flutter, google_sign_in

More

Packages that depend on firebase_dart_flutter_auth_google