File tree 2 files changed +9
-17
lines changed
2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export const DEFAULT_TOKEN_API_HOST = 'securetoken.googleapis.com';
38
38
export const DEFAULT_API_HOST = 'identitytoolkit.googleapis.com' ;
39
39
export const DEFAULT_API_SCHEME = 'https' ;
40
40
41
- class AuthImpl implements Auth {
41
+ export class AuthImpl implements Auth {
42
42
currentUser : User | null = null ;
43
43
private operations = Promise . resolve ( ) ;
44
44
private persistenceManager ?: PersistenceUserManager ;
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
+ import { AuthImpl } from '../src/core/auth/auth_impl' ;
18
19
import { StsTokenManager } from '../src/core/user/token_manager' ;
19
20
import { UserImpl } from '../src/core/user/user_impl' ;
20
21
import { Auth } from '../src/model/auth' ;
21
22
import { User } from '../src/model/user' ;
22
23
23
24
export const TEST_HOST = 'localhost' ;
24
25
export const TEST_TOKEN_HOST = 'localhost/token' ;
26
+ export const TEST_AUTH_DOMAIN = 'localhost' ;
25
27
export const TEST_SCHEME = 'mock' ;
26
28
export const TEST_KEY = 'test-api-key' ;
27
29
28
- export const mockAuth : Auth = ( {
29
- name : 'test-app' ,
30
- config : {
30
+ export const mockAuth : Auth = new AuthImpl (
31
+ 'test-app' ,
32
+ {
31
33
apiKey : TEST_KEY ,
34
+ authDomain : TEST_AUTH_DOMAIN ,
32
35
apiHost : TEST_HOST ,
33
36
apiScheme : TEST_SCHEME ,
34
37
tokenApiHost : TEST_TOKEN_HOST ,
35
38
sdkClientVersion : 'testSDK/0.0.0'
36
39
} ,
37
- _isInitialized : true ,
38
- currentUser : null ,
39
- async setPersistence ( ) { } ,
40
- async updateCurrentUser ( ) { } ,
41
- async signOut ( ) { } ,
42
- onAuthStateChanged ( ) {
43
- return ( ) => { } ;
44
- } ,
45
- onIdTokenChanged ( ) {
46
- return ( ) => { } ;
47
- } ,
48
- _notifyStateListeners ( ) { }
49
- } as unknown ) as Auth ;
40
+ [ ] ,
41
+ ) ;
50
42
51
43
export function testUser (
52
44
uid : string ,
You can’t perform that action at this time.
0 commit comments