Skip to content

Commit c7ee0df

Browse files
author
Gordon Hayes
committed
fix: firebase not initialized on web error
1 parent f6951e6 commit c7ee0df

File tree

4 files changed

+62
-45
lines changed

4 files changed

+62
-45
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Pre-lit Firebase authentication. It provides a set of convenient utilities and w
2929
- [Google Sign In for Android](#google-sign-in-for-android)
3030
- [Google Sign In for iOS](#google-sign-in-for-ios)
3131
- [iOS additional requirement](#ios-additional-requirement)
32+
- [Google Sign in for Web](#google-sign-in-for-web)
3233
- [Apple Sign In for Android](#apple-sign-in-for-android)
3334
- [Apple Sign In for iOS](#apple-sign-in-for-ios)
3435
- [Twitter Sign In for iOS and Android](#twitter-sign-in-for-ios-and-android)
@@ -313,6 +314,22 @@ Note that according to https://developer.apple.com/sign-in-with-apple/get-starte
313314
starting June 30, 2020, apps that use login services must also offer a "Sign in
314315
with Apple" option when submitting to the Apple App Store.
315316

317+
### Google Sign in for Web
318+
319+
You will need to add the Google Sign in Client ID to your `index.html` file. You can get this ID from the Firebase console, within the Google Sign-in Web Configuration (Authentication section).
320+
321+
An example is below:
322+
323+
`web/index.html`
324+
```html
325+
...
326+
<body>
327+
328+
<!-- GOOGLE SignIn Client ID -->
329+
<meta name="google-signin-client_id" content="ADD-YOUR-CLIENT-ID.apps.googleusercontent.com">
330+
...
331+
```
332+
316333
### Apple Sign In for Android
317334
This should be working, but has not been tested. There should be configuration examples in the Firebase documentation.
318335

example/pubspec.lock

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,42 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.4.2"
10+
version: "2.5.0-nullsafety"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
1414
name: boolean_selector
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "2.0.0"
17+
version: "2.1.0-nullsafety"
1818
characters:
1919
dependency: transitive
2020
description:
2121
name: characters
2222
url: "https://pub.dartlang.org"
2323
source: hosted
24-
version: "1.0.0"
24+
version: "1.1.0-nullsafety.2"
2525
charcode:
2626
dependency: transitive
2727
description:
2828
name: charcode
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "1.1.3"
31+
version: "1.2.0-nullsafety"
3232
clock:
3333
dependency: transitive
3434
description:
3535
name: clock
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "1.0.1"
38+
version: "1.1.0-nullsafety"
3939
collection:
4040
dependency: transitive
4141
description:
4242
name: collection
4343
url: "https://pub.dartlang.org"
4444
source: hosted
45-
version: "1.14.13"
45+
version: "1.15.0-nullsafety.2"
4646
cupertino_icons:
4747
dependency: "direct main"
4848
description:
@@ -63,7 +63,7 @@ packages:
6363
name: fake_async
6464
url: "https://pub.dartlang.org"
6565
source: hosted
66-
version: "1.1.0"
66+
version: "1.1.0-nullsafety"
6767
firebase:
6868
dependency: transitive
6969
description:
@@ -84,21 +84,21 @@ packages:
8484
name: firebase_auth_oauth
8585
url: "https://pub.dartlang.org"
8686
source: hosted
87-
version: "0.2.0"
87+
version: "0.2.1"
8888
firebase_auth_oauth_platform_interface:
8989
dependency: transitive
9090
description:
9191
name: firebase_auth_oauth_platform_interface
9292
url: "https://pub.dartlang.org"
9393
source: hosted
94-
version: "0.2.0"
94+
version: "0.2.1"
9595
firebase_auth_oauth_web:
9696
dependency: transitive
9797
description:
9898
name: firebase_auth_oauth_web
9999
url: "https://pub.dartlang.org"
100100
source: hosted
101-
version: "0.2.0"
101+
version: "0.2.1"
102102
firebase_auth_platform_interface:
103103
dependency: transitive
104104
description:
@@ -239,14 +239,14 @@ packages:
239239
name: matcher
240240
url: "https://pub.dartlang.org"
241241
source: hosted
242-
version: "0.12.8"
242+
version: "0.12.10-nullsafety"
243243
meta:
244244
dependency: transitive
245245
description:
246246
name: meta
247247
url: "https://pub.dartlang.org"
248248
source: hosted
249-
version: "1.1.8"
249+
version: "1.3.0-nullsafety.2"
250250
nested:
251251
dependency: transitive
252252
description:
@@ -260,7 +260,7 @@ packages:
260260
name: path
261261
url: "https://pub.dartlang.org"
262262
source: hosted
263-
version: "1.7.0"
263+
version: "1.8.0-nullsafety"
264264
pedantic:
265265
dependency: transitive
266266
description:
@@ -300,14 +300,14 @@ packages:
300300
name: source_span
301301
url: "https://pub.dartlang.org"
302302
source: hosted
303-
version: "1.7.0"
303+
version: "1.8.0-nullsafety"
304304
stack_trace:
305305
dependency: transitive
306306
description:
307307
name: stack_trace
308308
url: "https://pub.dartlang.org"
309309
source: hosted
310-
version: "1.9.5"
310+
version: "1.10.0-nullsafety"
311311
state_notifier:
312312
dependency: transitive
313313
description:
@@ -321,42 +321,42 @@ packages:
321321
name: stream_channel
322322
url: "https://pub.dartlang.org"
323323
source: hosted
324-
version: "2.0.0"
324+
version: "2.1.0-nullsafety"
325325
string_scanner:
326326
dependency: transitive
327327
description:
328328
name: string_scanner
329329
url: "https://pub.dartlang.org"
330330
source: hosted
331-
version: "1.0.5"
331+
version: "1.1.0-nullsafety"
332332
term_glyph:
333333
dependency: transitive
334334
description:
335335
name: term_glyph
336336
url: "https://pub.dartlang.org"
337337
source: hosted
338-
version: "1.1.0"
338+
version: "1.2.0-nullsafety"
339339
test_api:
340340
dependency: transitive
341341
description:
342342
name: test_api
343343
url: "https://pub.dartlang.org"
344344
source: hosted
345-
version: "0.2.17"
345+
version: "0.2.19-nullsafety"
346346
typed_data:
347347
dependency: transitive
348348
description:
349349
name: typed_data
350350
url: "https://pub.dartlang.org"
351351
source: hosted
352-
version: "1.2.0"
352+
version: "1.3.0-nullsafety.2"
353353
vector_math:
354354
dependency: transitive
355355
description:
356356
name: vector_math
357357
url: "https://pub.dartlang.org"
358358
source: hosted
359-
version: "2.0.8"
359+
version: "2.1.0-nullsafety.2"
360360
sdks:
361-
dart: ">=2.9.0-14.0.dev <3.0.0"
361+
dart: ">=2.10.0-0.0.dev <2.10.0"
362362
flutter: ">=1.16.0 <2.0.0"

pubspec.lock

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ packages:
2828
name: async
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "2.4.2"
31+
version: "2.5.0-nullsafety"
3232
boolean_selector:
3333
dependency: transitive
3434
description:
3535
name: boolean_selector
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "2.0.0"
38+
version: "2.1.0-nullsafety"
3939
build:
4040
dependency: transitive
4141
description:
@@ -98,14 +98,14 @@ packages:
9898
name: characters
9999
url: "https://pub.dartlang.org"
100100
source: hosted
101-
version: "1.0.0"
101+
version: "1.1.0-nullsafety.2"
102102
charcode:
103103
dependency: transitive
104104
description:
105105
name: charcode
106106
url: "https://pub.dartlang.org"
107107
source: hosted
108-
version: "1.1.3"
108+
version: "1.2.0-nullsafety"
109109
checked_yaml:
110110
dependency: transitive
111111
description:
@@ -126,7 +126,7 @@ packages:
126126
name: clock
127127
url: "https://pub.dartlang.org"
128128
source: hosted
129-
version: "1.0.1"
129+
version: "1.1.0-nullsafety"
130130
code_builder:
131131
dependency: transitive
132132
description:
@@ -140,7 +140,7 @@ packages:
140140
name: collection
141141
url: "https://pub.dartlang.org"
142142
source: hosted
143-
version: "1.14.13"
143+
version: "1.15.0-nullsafety.2"
144144
convert:
145145
dependency: transitive
146146
description:
@@ -182,7 +182,7 @@ packages:
182182
name: fake_async
183183
url: "https://pub.dartlang.org"
184184
source: hosted
185-
version: "1.1.0"
185+
version: "1.1.0-nullsafety"
186186
firebase:
187187
dependency: transitive
188188
description:
@@ -203,21 +203,21 @@ packages:
203203
name: firebase_auth_oauth
204204
url: "https://pub.dartlang.org"
205205
source: hosted
206-
version: "0.2.0"
206+
version: "0.2.1"
207207
firebase_auth_oauth_platform_interface:
208208
dependency: transitive
209209
description:
210210
name: firebase_auth_oauth_platform_interface
211211
url: "https://pub.dartlang.org"
212212
source: hosted
213-
version: "0.2.0"
213+
version: "0.2.1"
214214
firebase_auth_oauth_web:
215215
dependency: transitive
216216
description:
217217
name: firebase_auth_oauth_web
218218
url: "https://pub.dartlang.org"
219219
source: hosted
220-
version: "0.2.0"
220+
version: "0.2.1"
221221
firebase_auth_platform_interface:
222222
dependency: transitive
223223
description:
@@ -414,14 +414,14 @@ packages:
414414
name: matcher
415415
url: "https://pub.dartlang.org"
416416
source: hosted
417-
version: "0.12.8"
417+
version: "0.12.10-nullsafety"
418418
meta:
419419
dependency: "direct main"
420420
description:
421421
name: meta
422422
url: "https://pub.dartlang.org"
423423
source: hosted
424-
version: "1.1.8"
424+
version: "1.3.0-nullsafety.2"
425425
mime:
426426
dependency: transitive
427427
description:
@@ -463,7 +463,7 @@ packages:
463463
name: path
464464
url: "https://pub.dartlang.org"
465465
source: hosted
466-
version: "1.7.0"
466+
version: "1.8.0-nullsafety"
467467
pedantic:
468468
dependency: transitive
469469
description:
@@ -545,14 +545,14 @@ packages:
545545
name: source_span
546546
url: "https://pub.dartlang.org"
547547
source: hosted
548-
version: "1.7.0"
548+
version: "1.8.0-nullsafety"
549549
stack_trace:
550550
dependency: transitive
551551
description:
552552
name: stack_trace
553553
url: "https://pub.dartlang.org"
554554
source: hosted
555-
version: "1.9.5"
555+
version: "1.10.0-nullsafety"
556556
state_notifier:
557557
dependency: "direct main"
558558
description:
@@ -566,7 +566,7 @@ packages:
566566
name: stream_channel
567567
url: "https://pub.dartlang.org"
568568
source: hosted
569-
version: "2.0.0"
569+
version: "2.1.0-nullsafety"
570570
stream_transform:
571571
dependency: transitive
572572
description:
@@ -580,21 +580,21 @@ packages:
580580
name: string_scanner
581581
url: "https://pub.dartlang.org"
582582
source: hosted
583-
version: "1.0.5"
583+
version: "1.1.0-nullsafety"
584584
term_glyph:
585585
dependency: transitive
586586
description:
587587
name: term_glyph
588588
url: "https://pub.dartlang.org"
589589
source: hosted
590-
version: "1.1.0"
590+
version: "1.2.0-nullsafety"
591591
test_api:
592592
dependency: transitive
593593
description:
594594
name: test_api
595595
url: "https://pub.dartlang.org"
596596
source: hosted
597-
version: "0.2.17"
597+
version: "0.2.19-nullsafety"
598598
timing:
599599
dependency: transitive
600600
description:
@@ -608,14 +608,14 @@ packages:
608608
name: typed_data
609609
url: "https://pub.dartlang.org"
610610
source: hosted
611-
version: "1.2.0"
611+
version: "1.3.0-nullsafety.2"
612612
vector_math:
613613
dependency: transitive
614614
description:
615615
name: vector_math
616616
url: "https://pub.dartlang.org"
617617
source: hosted
618-
version: "2.0.8"
618+
version: "2.1.0-nullsafety.2"
619619
watcher:
620620
dependency: transitive
621621
description:
@@ -638,5 +638,5 @@ packages:
638638
source: hosted
639639
version: "2.2.1"
640640
sdks:
641-
dart: ">=2.9.0-14.0.dev <3.0.0"
641+
dart: ">=2.10.0-0.0.dev <2.10.0"
642642
flutter: ">=1.16.0 <2.0.0"

0 commit comments

Comments
 (0)