File tree 2 files changed +14
-7
lines changed
packages-exp/auth-exp/demo
2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,13 @@ in the `config.js` file.
42
42
43
43
## Deploy
44
44
45
+ Before deploying, you may need to build the auth-exp package:
46
+ ``` bash
47
+ yarn build:deps
48
+ ```
49
+
50
+ This can take some time, and you only need to do it if you've modified the auth-exp package.
51
+
45
52
To run the app locally, simply issue the following command in the ` auth-exp/demo ` directory:
46
53
47
54
``` bash
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ import {
32
32
updateEmail ,
33
33
updatePassword ,
34
34
updateProfile ,
35
+ signInAnonymously ,
36
+ signInWithCustomToken ,
35
37
isSignInWithEmailLink ,
36
38
fetchSignInMethodsForEmail
37
39
} from '@firebase/auth-exp' ;
@@ -376,21 +378,19 @@ function onReauthenticateWithEmailLink() {
376
378
* @param {DOMEvent } event HTML DOM event returned by the listener.
377
379
*/
378
380
function onSignInWithCustomToken ( event ) {
379
- alertNotImplemented ( ) ;
380
381
// The token can be directly specified on the html element.
381
- // var token = $('#user-custom-token').val();
382
+ var token = $ ( '#user-custom-token' ) . val ( ) ;
382
383
383
- // auth. signInWithCustomToken(token)
384
- // .then(onAuthUserCredentialSuccess, onAuthError);
384
+ signInWithCustomToken ( auth , token )
385
+ . then ( onAuthUserCredentialSuccess , onAuthError ) ;
385
386
}
386
387
387
388
/**
388
389
* Signs in anonymously.
389
390
*/
390
391
function onSignInAnonymously ( ) {
391
- alertNotImplemented ( ) ;
392
- // auth.signInAnonymously()
393
- // .then(onAuthUserCredentialSuccess, onAuthError);
392
+ signInAnonymously ( auth )
393
+ . then ( onAuthUserCredentialSuccess , onAuthError ) ;
394
394
}
395
395
396
396
/**
You can’t perform that action at this time.
0 commit comments