Skip to content

Commit

Permalink
Release v1.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Garnier committed Feb 12, 2018
1 parent ff3b6ed commit 3aa82e8
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dist/FirebaseAuth.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/FirebaseAuth.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 18 additions & 6 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ In your app:
4. Use the `FirebaseAuth` component in your template passing it the **Firebase UI configuration** and a **Firebase Auth instance**.


### `FirebaseAuth` vs `StyledFirebaseAuth`
### `FirebaseAuth` vs. `StyledFirebaseAuth`

There are two components that allow you to add FirebaseUI auth to your application: `FirebaseAuth` and `StyledFirebaseAuth`. The difference is that `FirebaseAuth` has a reference to the Firebase UI CSS (it `requires` the CSS) whereas `StyledFirebaseAuth` includes the CSS directly in its built. For simplicity you should use `StyledFirebaseAuth` and for better performances and build sizes you should use `FirebaseAuth`. `FirebaseAuth` is meant to be used with a CSS/style loader as part of yor webpack built configuration. See the [Packing your app](#packing-your-app) section
There are two similar components that allow you to add FirebaseUI auth to your application: `FirebaseAuth` and `StyledFirebaseAuth`.
- `FirebaseAuth` has a reference to the FirebaseUI CSS file (it `requires` the CSS).
- `StyledFirebaseAuth` is bundled with the CSS directly.

For simplicity you should use `StyledFirebaseAuth` and for potential better performances and build sizes you can use `FirebaseAuth`. `FirebaseAuth` is meant to be used with a CSS/style loader as part of yor webpack built configuration. See the [Packing your app](#packing-your-app) section.


### Using `StyledFirebaseAuth` with a redirect
Expand Down Expand Up @@ -97,6 +101,7 @@ firebase.initializeApp(config);

class SignInScreen extends React.Component {

// The component's Local state.
state = {
signedIn: false // Local signed-in state.
};
Expand All @@ -110,17 +115,17 @@ class SignInScreen extends React.Component {
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
firebase.auth.FacebookAuthProvider.PROVIDER_ID
],
// Avoid redirects after sign-in.
callbacks: {
// Avoid redirects after sign-in.
signInSuccess: () => false
}
};

// Listen to the Firebase Auth state and set the local state.
componentWillMount() {
firebase.auth().onAuthStateChanged((user) => {
this.setState({signedIn: !!user});
});
firebase.auth().onAuthStateChanged(
(user) => this.setState({signedIn: !!user})
);
}

render() {
Expand Down Expand Up @@ -271,6 +276,13 @@ If you would like to see an example of styling, have a look at the [example app]
Alternatively you can include the styling in a `<style>` tag in your application's markup.


## Server-Side Rendering (SSR)

FirebaseUI React cannot be rendered on the serverside becasue the underlying, wrapped library ([FirebaseUI](https://npmjs.com/package/firebaseui) does not work server-side.

You may still import and include the library in an app that uses SSR: there should be no errors but no elements will be rendered.


## Contributing

We'd love that you contribute to the project. Before doing so please read our [Contributor guide](CONTRIBUTING.md).
Expand Down
2 changes: 1 addition & 1 deletion dist/StyledFirebaseAuth.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/StyledFirebaseAuth.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-firebaseui",
"version": "1.1.7",
"version": "1.1.8",
"description": "React wrapper for firebaseui: Javascript library for customizable UI on top of Firebase SDK",
"files": [
"FirebaseAuth.js",
Expand Down
6 changes: 3 additions & 3 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"firebaseui": "^2.6.0",
"react": "15.6.1",
"react-dom": "15.6.1",
"react-firebaseui": "^1.1.7"
"react-firebaseui": "^1.1.8"
},
"devDependencies": {
"babel-cli": "6.24.1",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-firebaseui",
"version": "1.1.7",
"version": "1.1.8",
"description": "React wrapper for firebaseui: Javascript library for customizable UI on top of Firebase SDK",
"files": [
"FirebaseAuth.js",
Expand Down

0 comments on commit 3aa82e8

Please sign in to comment.