File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ node_modules
44tsconfig.json
55dist /
66.DS_Store
7+ .idea
Original file line number Diff line number Diff line change 1+ function updateUserProfile ( ) {
2+ // [START auth_update_user_profile]
3+ const { getAuth, updateProfile } = require ( "firebase/auth" ) ;
4+ const auth = getAuth ( ) ;
5+ updateProfile ( auth . currentUser , {
6+ displayName : "Jane Q. User" , photoURL : "https://example.com/jane-q-user/profile.jpg"
7+ } ) . then ( ( ) => {
8+ // Profile updated!
9+ } ) . catch ( ( error ) => {
10+ const errorCode = error . code ;
11+ const errorMessage = error . message ;
12+ // ..
13+ } ) ;
14+ // [END auth_update_user_profile]
15+ }
16+
17+ function updateUserEmail ( ) {
18+ // [START auth_update_user_email]
19+ const { getAuth, updateEmail } = require ( "firebase/auth" ) ;
20+ const auth = getAuth ( ) ;
21+ updateEmail ( auth . currentUser , "[email protected] " ) . then ( ( ) => { 22+ // Email updated!
23+ } ) . catch ( ( error ) => {
24+ const errorCode = error . code ;
25+ const errorMessage = error . message ;
26+ // ..
27+ } ) ;
28+ // [END auth_update_user_email]
29+ }
You can’t perform that action at this time.
0 commit comments