Skip to content

Commit 3e41c91

Browse files
authored
* fix(firestore): logging in deletes any custom fields on user object - prescottprue#366 * fix(docs): `scopes` parameter added to auth docs - prescottprue#380 * fix(core): remove unnecessary `gitbook` dependencies (from docs) * feat(auth): firestore profiles now include all values returned in `authResponse.toJSON()` **except for** keys provided to `keysToRemoveFromAuth` config option (`['appName', 'apiKey', 'authDomain', 'redirectEventId', 'stsTokenManager', 'uid']` by default). * feat(auth): firestore profiles time/date meta fields (i.e. `createdAt`) stored as timestamps instead of strings * feat(core): [prettier](https://github.com/prettier/prettier) added with associated eslint config and `format` npm script
1 parent 79dc4d6 commit 3e41c91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2431
-1844
lines changed

.eslintrc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ root: true
22

33
parser: babel-eslint
44

5-
extends: [standard, standard-react]
6-
plugins: [babel, react]
5+
extends: [standard, standard-react, prettier, prettier/react]
6+
plugins: [babel, react, prettier]
77

88
env:
99
browser: true
@@ -14,3 +14,13 @@ env:
1414
rules:
1515
semi: [2, 'never']
1616
no-console: 'error'
17+
prettier/prettier: ['error', {
18+
singleQuote: true,
19+
trailingComma: 'es6',
20+
semi: false,
21+
bracketSpacing: true,
22+
jsxBracketSameLine: true,
23+
printWidth: 80,
24+
tabWidth: 2,
25+
useTabs: false
26+
}]

docs/api/constants.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,7 @@ Default configuration options
139139
- `firestoreNamespace` **[Boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** `firestoreHelpers` Namespace for
140140
firestore helpers (**WARNING** Changing this will break firestoreConnect HOC.
141141
Do **NOT** change to `'firestore'`)
142+
- `keysToRemoveFromAuth` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** (default at end)
143+
list of keys to remove from authentication reponse before writing to profile
144+
(currenlty only used for profiles stored on Firestore). `['appName', 'apiKey'
145+
, 'authDomain', 'redirectEventId', 'stsTokenManager', 'uid']`

docs/auth.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ export default firebaseConnect()(SomeComponent) // or withFirebase(SomeComponent
6363
```js
6464
{
6565
provider: "facebook | google | twitter",
66-
type: "popup | redirect" // popup is default
66+
type: "popup | redirect", // popup is default
67+
scopes: ['email'] // email is default
6768
}
6869
```
6970
* credential (runs `ref.signInWithCredential(credential)`) :
@@ -122,7 +123,8 @@ props.firebase.login({
122123
```js
123124
props.firebase.login({
124125
provider: 'google',
125-
type: 'popup'
126+
type: 'popup',
127+
// scopes: ['email'] // not required
126128
})
127129
```
128130

0 commit comments

Comments
 (0)