-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support for Firebase v9 (compat) #850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 38 commits
c6e3bb1
99ca009
6dc3781
4d34ac8
806ff1d
5e76e3a
41a29e5
3205e24
3238bd4
41c69e5
aa9d4ce
b489731
dda6a74
75d87fa
e060629
fdcbed4
0887bd8
c68fa83
f70377b
b332860
f113c47
1d7495a
c5afcd7
6779db5
e546ea9
125e537
9b6f115
0ef38e0
44fd819
4f0295a
cf5ac8a
a4cf936
7e7db86
ed5aa72
6f040d7
628609b
8336d16
c0af661
cedeb63
18947ba
93d79e3
eaafdf1
66e445d
f986910
5d0d0b5
16d65e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Now using Firebase v9/compat |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,8 +62,8 @@ You just need to include the following script and CSS file in the `<head>` tag | |
of your page, below the initialization snippet from the Firebase Console: | ||
|
||
```html | ||
<script src="https://www.gstatic.com/firebasejs/ui/5.0.0/firebase-ui-auth.js"></script> | ||
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/5.0.0/firebase-ui-auth.css" /> | ||
<script src="https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.js"></script> | ||
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.css" /> | ||
``` | ||
|
||
#### Localized Widget | ||
|
@@ -72,17 +72,17 @@ Localized versions of the widget are available through the CDN. To use a | |
localized widget, load the localized JS library instead of the default library: | ||
|
||
```html | ||
<script src="https://www.gstatic.com/firebasejs/ui/5.0.0/firebase-ui-auth__{LANGUAGE_CODE}.js"></script> | ||
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/5.0.0/firebase-ui-auth.css" /> | ||
<script src="https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth__{LANGUAGE_CODE}.js"></script> | ||
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.css" /> | ||
``` | ||
|
||
where `{LANGUAGE_CODE}` is replaced by the code of the language you want. For example, the French | ||
version of the library is available at | ||
`https://www.gstatic.com/firebasejs/ui/5.0.0/firebase-ui-auth__fr.js`. The list of available | ||
`https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth__fr.js`. The list of available | ||
languages and their respective language codes can be found at [LANGUAGES.md](LANGUAGES.md). | ||
|
||
Right-to-left languages also require the right-to-left version of the stylesheet, available at | ||
`https://www.gstatic.com/firebasejs/ui/5.0.0/firebase-ui-auth-rtl.css`, instead of the default | ||
`https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth-rtl.css`, instead of the default | ||
stylesheet. The supported right-to-left languages are Arabic (ar), Farsi (fa), and Hebrew (iw). | ||
|
||
### Option 2: npm Module | ||
|
@@ -91,28 +91,17 @@ Install FirebaseUI and its peer-dependency Firebase via npm using the following | |
commands: | ||
|
||
```bash | ||
$ npm install firebase --save | ||
$ npm install firebaseui --save | ||
$ npm install firebase firebaseui --save | ||
``` | ||
|
||
You can then `require` the following modules within your source files: | ||
You can then `import` the following modules within your source files: | ||
|
||
```javascript | ||
var firebase = require('firebase'); | ||
var firebaseui = require('firebaseui'); | ||
// or using ES6 imports: | ||
import firebase from 'firebase/compat/app'; | ||
import * as firebaseui from 'firebaseui' | ||
import 'firebaseui/dist/firebaseui.css' | ||
``` | ||
|
||
Or include the required files in your HTML, if your HTTP Server serves the files | ||
within `node_modules/`: | ||
|
||
```html | ||
<script src="node_modules/firebaseui/dist/firebaseui.js"></script> | ||
<link type="text/css" rel="stylesheet" href="node_modules/firebaseui/dist/firebaseui.css" /> | ||
``` | ||
|
||
### Option 3: Bower component | ||
|
||
Install FirebaseUI and its dependencies via Bower using the following command: | ||
|
@@ -193,14 +182,11 @@ for a more in-depth example, showcasing a Single Page Application mode. | |
<head> | ||
<meta charset="UTF-8"> | ||
<title>Sample FirebaseUI App</title> | ||
<!-- ******************************************************************************************* | ||
* TODO(DEVELOPER): Paste the initialization snippet from: | ||
* Firebase Console > Overview > Add Firebase to your web app. | ||
* In addition, include the firebase-auth SDK: | ||
* <script src="https://www.gstatic.com/firebasejs/[FIREBASE VERSION USED IN SNIPPET]/firebase-auth.js"></script> * | ||
***************************************************************************************** --> | ||
<script src="https://www.gstatic.com/firebasejs/ui/5.0.0/firebase-ui-auth.js"></script> | ||
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/5.0.0/firebase-ui-auth.css" /> | ||
<script src="https://www.gstatic.com/firebasejs/9.1.0/firebase-app-compat.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/9.1.0/firebase-auth-compat.js"></script> | ||
<script src="/__/firebase/init.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.js"></script> | ||
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.css" /> | ||
<script type="text/javascript"> | ||
// FirebaseUI config. | ||
var uiConfig = { | ||
|
@@ -268,10 +254,9 @@ Here is how you would track the Auth state across all your pages: | |
<head> | ||
<meta charset="UTF-8"> | ||
<title>Sample FirebaseUI App</title> | ||
<!-- ******************************************************************************************* | ||
* TODO(DEVELOPER): Paste the initialization snippet from: | ||
* Firebase Console > Overview > Add Firebase to your web app. * | ||
***************************************************************************************** --> | ||
<script src="https://www.gstatic.com/firebasejs/9.1.0/firebase-app-compat.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/9.1.0/firebase-auth-compat.js"></script> | ||
<script src="/__/firebase/init.js"></script> | ||
<script type="text/javascript"> | ||
initApp = function() { | ||
firebase.auth().onAuthStateChanged(function(user) { | ||
|
@@ -1347,12 +1332,11 @@ FirebaseUI is displayed. | |
<head> | ||
<meta charset="UTF-8"> | ||
<title>Sample FirebaseUI App</title> | ||
<!-- ******************************************************************************************* | ||
* TODO(DEVELOPER): Paste the initialization snippet from: | ||
* Firebase Console > Overview > Add Firebase to your web app. * | ||
***************************************************************************************** --> | ||
<script src="https://www.gstatic.com/firebasejs/ui/5.0.0/firebase-ui-auth.js"></script> | ||
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/5.0.0/firebase-ui-auth.css" /> | ||
<script src="https://www.gstatic.com/firebasejs/9.1.0/firebase-app-compat.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/9.1.0/firebase-auth-compat.js"></script> | ||
<script src="/__/firebase/init.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.js"></script> | ||
<link type="text/css" rel="stylesheet" href="https://www.gstatic.com/firebasejs/ui/6.0.0/firebase-ui-auth.css" /> | ||
<script type="text/javascript"> | ||
// FirebaseUI config. | ||
var uiConfig = { | ||
|
@@ -1939,6 +1923,26 @@ can verify in the [demo app](https://fir-ui-demo-84a6c.firebaseapp.com/)). | |
|
||
**For v1.0.0 and superior:** https://github.com/firebase/firebaseui-web/releases | ||
|
||
### 6.0.0 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it might be better to add an intro under the line below, to let developers understand their when they can choose from using Firebase V8, V9 compat, V9 and what to do along with using FirebaseUI.
For those developers:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @xil222 Agree we should be more descriptive but should be cautious about communicating any plans here, IMO. Especially when our roadmap is still up in the air. Either way going compat is a an essential first step. @bojeil-google thoughts on wording? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I agree with @jamesdaniels (let's not communicate any plans yet). Let's just focus on informing customers that v6.0.0 should be used with firebase version v9 (compat)and higher. We can also explain some of the changes needed when switching from v8 to v9 (such as the difference in how app and auth are imported or included via cdn, etc.) We can also mention the benefit when using firebaseui v6.0.0 with other v9 firebase services, such as firestore (when it comes to modularization). The description below seems to cover most of that. |
||
FirebaseUI-web v6.0.0 is intended to be used alongside Firebase JS SDK v9 compat. | ||
|
||
If using the CDN, change your Firebase imports to: | ||
|
||
```html | ||
<script src="https://www.gstatic.com/firebasejs/9.1.0/firebase-app-compat.js"></script> | ||
<script src="https://www.gstatic.com/firebasejs/9.1.0/firebase-auth-compat.js"></script> | ||
``` | ||
|
||
If NPM: | ||
|
||
```ts | ||
import firebase from 'firebase/compat/app'; | ||
import 'firebase/compat/auth'; | ||
``` | ||
|
||
[See the Firebase upgrade guide for more information.](https://firebase.google.com/docs/web/modular-upgrade) | ||
|
||
### 5.0.0 | ||
|
||
`accountchooser.com` has been operating in "universal opt-out" mode and was | ||
|
Uh oh!
There was an error while loading. Please reload this page.