Skip to content

Commit 052daf1

Browse files
committed
consistency with rest of docs
1 parent 113cbda commit 052daf1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/recipes/auth.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -60,29 +60,29 @@ import { compose, createStore, applyMiddleware } from 'redux'
6060
import { getFirebase, reactReduxFirebase } from 'react-redux-firebase'
6161

6262
// Firebase config
63-
const firebaseConfig = {
63+
const fbConfig = {
6464
apiKey: '<your-api-key>',
6565
authDomain: '<your-auth-domain>',
6666
databaseURL: '<your-database-url>',
6767
storageBucket: '<your-storage-bucket>'
6868
}
6969
// react-redux-firebase options
70-
const config = {
70+
const rrfConfig = {
7171
userProfile: 'users', // firebase root where user profiles are stored
7272
attachAuthIsReady: true, // attaches auth is ready promise to store
7373
firebaseStateName: 'firebase' // should match the reducer name ('firebase' is default)
7474
}
7575

7676
const createStore = (initialState = {}) => {
7777
// Initialize Firebase instance
78-
firebase.initializeApp(firebaseConfig)
78+
firebase.initializeApp(fbConfig)
7979

8080
// Add redux Firebase to compose
8181
const createStoreWithFirebase = createStore(
8282
rootReducer,
8383
initialState,
8484
compose(
85-
reactReduxFirebase(firebase, config),
85+
reactReduxFirebase(firebase, rrfConfig),
8686
applyMiddleware(thunk.withExtraArgument(getFirebase))
8787
)
8888
)
@@ -138,12 +138,12 @@ The logic that runs this is partially based on:
138138
Include the `userProfile` parameter in config when setting up store middleware:
139139

140140
```js
141-
const config = {
141+
const rrfConfig = {
142142
userProfile: 'users', // where profiles are stored in database
143143
presence: 'presence', // where list of online users is stored in database
144144
sessions: 'sessions' // where list of user sessions is stored in database (presence must be enabled)
145145
}
146-
reactReduxFirebase(firebaseConfig, config)
146+
reactReduxFirebase(fbConfig, rrfConfig)
147147
```
148148

149149
Now when logging in through `login` method, user will be listed as online until they logout or end the session (close the tab or window).

0 commit comments

Comments
 (0)