File tree 3 files changed +23
-7
lines changed
packages-exp/auth-exp/src/core
3 files changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,11 @@ import { browserLocalPersistence } from '../persistence/browser';
30
30
import { inMemoryPersistence } from '../persistence/in_memory' ;
31
31
import { PersistenceUserManager } from '../persistence/persistence_user_manager' ;
32
32
import { ClientPlatform , getClientVersion } from '../util/version' ;
33
- import { DEFAULT_API_HOST , DEFAULT_API_SCHEME , initializeAuth } from './auth_impl' ;
33
+ import {
34
+ DEFAULT_API_HOST ,
35
+ DEFAULT_API_SCHEME ,
36
+ initializeAuth
37
+ } from './auth_impl' ;
34
38
35
39
use ( sinonChai ) ;
36
40
Original file line number Diff line number Diff line change @@ -26,7 +26,10 @@ import { mockEndpoint } from '../../../test/api/helper';
26
26
import { testUser } from '../../../test/mock_auth' ;
27
27
import * as fetch from '../../../test/mock_fetch' ;
28
28
import { Endpoint } from '../../api' ;
29
- import { APIUserInfo , ProviderUserInfo } from '../../api/account_management/account' ;
29
+ import {
30
+ APIUserInfo ,
31
+ ProviderUserInfo
32
+ } from '../../api/account_management/account' ;
30
33
import { UserInfo } from '../../model/user' ;
31
34
import { ProviderId } from '../providers' ;
32
35
import { _reloadWithoutSaving , reload } from './reload' ;
@@ -152,7 +155,7 @@ describe('reload()', () => {
152
155
providerUserInfo : [
153
156
{
154
157
...BASIC_USER_INFO ,
155
- providerId : 'naaaah' ,
158
+ providerId : 'naaaah'
156
159
}
157
160
]
158
161
}
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- import { getAccountInfo , ProviderUserInfo } from '../../api/account_management/account' ;
18
+ import {
19
+ getAccountInfo ,
20
+ ProviderUserInfo
21
+ } from '../../api/account_management/account' ;
19
22
import { User , UserInfo } from '../../model/user' ;
20
23
import { ProviderId } from '../providers' ;
21
24
import { assert } from '../util/assert' ;
@@ -68,9 +71,15 @@ function mergeProviderData(
68
71
return [ ...deduped , ...newData ] ;
69
72
}
70
73
71
- function extractProviderData ( providers : ProviderUserInfo [ ] , appName : string ) : UserInfo [ ] {
72
- return providers . map ( ( { providerId, ...provider } ) => {
73
- assert ( providerId && Object . values < string > ( ProviderId ) . includes ( providerId ) , appName ) ;
74
+ function extractProviderData (
75
+ providers : ProviderUserInfo [ ] ,
76
+ appName : string
77
+ ) : UserInfo [ ] {
78
+ return providers . map ( ( { providerId, ...provider } ) => {
79
+ assert (
80
+ providerId && Object . values < string > ( ProviderId ) . includes ( providerId ) ,
81
+ appName
82
+ ) ;
74
83
return {
75
84
uid : provider . rawId || '' ,
76
85
displayName : provider . displayName || null ,
You can’t perform that action at this time.
0 commit comments