You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -61,13 +63,13 @@ Pre-lit Firebase authentication. It provides a set of convenient utilities and w
61
63
62
64
## Getting started
63
65
64
-
See the [example](example/) project to get up and running fast.
66
+
Please note that before this package can be used, Firebase Core needs to be initialized in your application. See the official [FlutterFire documentation](https://firebase.flutter.dev/docs/overview#initializing-flutterfire) for up to date information.
65
67
66
-
Or take a look at a [live demo](https://funwithflutter.github.io/lit_firebase_example/).
68
+
For a complete example (with Firebase initialization) see the [example](example/) project.
69
+
70
+
Or take a look at a [live demo](https://funwithflutter.github.io/lit_firebase_example/). Note that this video was recorded with the old version of FlutterFire and Lit Firebase Auth. As such, some configuration may be different. For example, this does not show how to initialize FlutterFire.
67
71
68
72
## Platform Configuration
69
-
<details>
70
-
<summary>...</summary>
71
73
72
74
### Android integration
73
75
@@ -115,7 +117,6 @@ Below is an example of a Flutter Web `index.html` with Firebase Auth enabled:
115
117
<!-- CONTINUE TO INITIALIZE FLUTTER WEB -->
116
118
...
117
119
```
118
-
</details>
119
120
120
121
## Usage
121
122
The two most important widgets are
@@ -258,32 +259,28 @@ Should only be used in the build method.
258
259
259
260
## Authentication Providers
260
261
262
+
Lit Firebase Auth supports a number of third party authentication providers, such as Google, Apple, Github, etc.
263
+
261
264
### Initialization
262
265
Enable the sign-in method you want to use in firebase console
263
266
264
267
### Google Sign In for Android
265
268
266
-
To access Google Sign-In, you'll need to make sure to [register your
Lit Firebase Auth uses the [google_sign_in](https://pub.dev/packages/google_sign_in) package for Google Sign in. Please see their documentation if you encounter difficulties.
268
270
269
-
You don't need to include the google-services.json file in your app unless you
270
-
are using Google services that require it. You do need to enable the OAuth APIs
271
-
that you want, using the [Google Cloud Platform API
272
-
manager](https://console.developers.google.com/). For example, if you
273
-
want to mimic the behavior of the Google Sign-In sample app, you'll need to
274
-
enable the [Google People API](https://developers.google.com/people/).
271
+
Please ensure you have done the steps outline in [Android integration](#android-integration)
275
272
276
-
Make sure you've filled out all required fields in the console for [OAuth consent screen](https://console.developers.google.com/apis/credentials/consent). Otherwise, you may encounter `APIException` errors.
273
+
The majority of the configuration is on Firebase side. First, Google Sign In needs to be enabled in the Authentication section of your Firebase project. Next, if you have not done so yet, you will need to provide your application's SHA certificate within your Firebase settings and replace the `google-services.json` file with the updated one. This is needed for Google Sign in to be allowed.
274
+
275
+
A correctly setup Firebase project and the correct `google-services.json` file is all you'll need.
277
276
278
277
### Google Sign In for iOS
279
278
280
-
1.[First register your application](https://developers.google.com/mobile/add?platform=ios).
281
-
2. Make sure the file you download in step 1 is named `GoogleService-Info.plist`.
282
-
3. Move or copy `GoogleService-Info.plist` into the `[my_project]/ios/Runner` directory.
283
-
4. Open Xcode, then right-click on `Runner` directory and select `Add Files to "Runner"`.
284
-
5. Select `GoogleService-Info.plist` from the file manager.
285
-
6. A dialog will show up and ask you to select the targets, select the `Runner` target.
286
-
7. Then add the `CFBundleURLTypes` attributes below into the `[my_project]/ios/Runner/Info.plist` file.
279
+
Lit Firebase Auth uses the [google_sign_in](https://pub.dev/packages/google_sign_in) package for Google Sign in. Please see their documentation if you encounter difficulties.
280
+
281
+
Please ensure you have done the steps outline in [iOS integration](#ios-integration)
282
+
283
+
Then add the `CFBundleURLTypes` attributes below into the `[my_project]/ios/Runner/Info.plist` file.
287
284
288
285
```xml
289
286
<!-- Put me in the [my_project]/ios/Runner/Info.plist file -->
@@ -303,16 +300,15 @@ Make sure you've filled out all required fields in the console for [OAuth consen
303
300
</array>
304
301
<!-- End of the Google Sign-in Section -->
305
302
```
306
-
### iOS additional requirement
303
+
304
+
#### iOS additional requirement
307
305
308
306
Note that according to https://developer.apple.com/sign-in-with-apple/get-started,
309
307
starting June 30, 2020, apps that use login services must also offer a "Sign in
310
308
with Apple" option when submitting to the Apple App Store.
311
309
312
-
Consider also using an Apple sign in plugin from pub.dev.
313
-
314
-
The Flutter Favorite [sign_in_with_apple](https://pub.dev/packages/sign_in_with_apple)
315
-
plugin could be an option.
310
+
### Apple Sign In for Android
311
+
This should be working, but has not been tested. There should be configuration examples in the Firebase documentation.
316
312
317
313
### Apple Sign In for iOS
318
314
@@ -323,6 +319,9 @@ plugin could be an option.
323
319
2. Copy Paste your API Key and API Secret into the Twitter Sign In Method in Firebase
324
320
3. Enable 3rd party authentication in Twitter Developer Portal and copy past callback URL from Firebase
325
321
322
+
### Github Sign In for iOS and Android
323
+
Similar process to Twitter Sign in.
324
+
326
325
### Using with Lit Firebase Auth
327
326
The supported third-party providers are:
328
327
* Google
@@ -504,9 +503,9 @@ The state of the password and email can be cleared manually by calling:
504
503
context.resetSignInForm()
505
504
```
506
505
507
-
This will reset the form to it's initial state.
506
+
This will reset the form to its initial state.
508
507
509
-
It's a good idea to do this when you have multiple `EmailTextFormField` and `PasswordTextFormField` widgets in seperate locations, for example when you have a separate Sign-in form and a Registration form.
508
+
It's a good idea to do this when you have multiple `EmailTextFormField` and `PasswordTextFormField` widgets in separate locations, for example when you have a separate Sign-in form and a Registration form.
0 commit comments