-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return phone number, display name and photo URL when creating AuthUser
- Loading branch information
Gael Hatchue
committed
May 2, 2021
1 parent
26477a1
commit 1dfe960
Showing
6 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,9 @@ describe('createAuthUser: basic tests', () => { | |
clientInitialized: false, | ||
email: null, | ||
emailVerified: false, | ||
phoneNumber: null, | ||
displayName: null, | ||
photoURL: null, | ||
getIdToken: expect.any(Function), | ||
id: null, | ||
firebaseUser: null, | ||
|
@@ -121,6 +124,9 @@ describe('createAuthUser: firebaseUserClientSDK', () => { | |
id: 'abc-123', | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-123-4567', | ||
displayName: 'Abc Cdf', | ||
photoURL: 'https://abc.googleusercontent.com/cdf/profile_photo.png', | ||
clientInitialized: false, | ||
getIdToken: expect.any(Function), | ||
firebaseUser: firebaseUserJSSDK, | ||
|
@@ -149,6 +155,9 @@ describe('createAuthUser: firebaseUserClientSDK', () => { | |
id: 'abc-123', | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-123-4567', | ||
displayName: 'Abc Cdf', | ||
photoURL: 'https://abc.googleusercontent.com/cdf/profile_photo.png', | ||
clientInitialized: false, | ||
getIdToken: expect.any(Function), | ||
firebaseUser: firebaseUserJSSDK, | ||
|
@@ -197,6 +206,9 @@ describe('createAuthUser: firebaseUserClientSDK', () => { | |
claims: {}, | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-123-4567', | ||
displayName: 'Abc Cdf', | ||
photoURL: 'https://abc.googleusercontent.com/cdf/profile_photo.png', | ||
clientInitialized: false, | ||
_token: null, | ||
}) | ||
|
@@ -234,6 +246,9 @@ describe('createAuthUser: firebaseUserAdminSDK', () => { | |
id: 'def-456', | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-234-5678', | ||
displayName: 'Def Ghi', | ||
photoURL: 'https://def.googleusercontent.com/ghi/profile_photo.png', | ||
clientInitialized: false, | ||
getIdToken: expect.any(Function), | ||
firebaseUser: null, | ||
|
@@ -255,6 +270,9 @@ describe('createAuthUser: firebaseUserAdminSDK', () => { | |
id: 'def-456', | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-234-5678', | ||
displayName: 'Def Ghi', | ||
photoURL: 'https://def.googleusercontent.com/ghi/profile_photo.png', | ||
clientInitialized: false, | ||
getIdToken: expect.any(Function), | ||
firebaseUser: null, | ||
|
@@ -314,6 +332,9 @@ describe('createAuthUser: firebaseUserAdminSDK', () => { | |
claims: {}, | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-234-5678', | ||
displayName: 'Def Ghi', | ||
photoURL: 'https://def.googleusercontent.com/ghi/profile_photo.png', | ||
clientInitialized: false, | ||
_token: null, | ||
}) | ||
|
@@ -334,6 +355,9 @@ describe('createAuthUser: firebaseUserAdminSDK', () => { | |
claims: {}, | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-234-5678', | ||
displayName: 'Def Ghi', | ||
photoURL: 'https://def.googleusercontent.com/ghi/profile_photo.png', | ||
clientInitialized: false, | ||
_token: 'my-id-token-def-456', | ||
}) | ||
|
@@ -363,6 +387,9 @@ describe('createAuthUser: firebaseUserAdminSDK', () => { | |
claims: customClaims, | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-234-5678', | ||
displayName: 'Def Ghi', | ||
photoURL: 'https://def.googleusercontent.com/ghi/profile_photo.png', | ||
clientInitialized: false, | ||
_token: 'my-id-token-def-456', | ||
}) | ||
|
@@ -383,6 +410,9 @@ describe('createAuthUser: firebaseUserAdminSDK', () => { | |
claims: {}, | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-234-5678', | ||
displayName: 'Def Ghi', | ||
photoURL: 'https://def.googleusercontent.com/ghi/profile_photo.png', | ||
clientInitialized: false, | ||
_token: undefined, | ||
}) | ||
|
@@ -411,6 +441,9 @@ describe('createAuthUser: serializedAuthUser', () => { | |
id: 'ghi-789', | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-345-6789', | ||
displayName: 'Ghi Jkl', | ||
photoURL: 'https://ghi.googleusercontent.com/jkl/profile_photo.png', | ||
clientInitialized: false, | ||
getIdToken: expect.any(Function), | ||
firebaseUser: null, | ||
|
@@ -436,6 +469,9 @@ describe('createAuthUser: serializedAuthUser', () => { | |
id: 'ghi-789', | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-345-6789', | ||
displayName: 'Ghi Jkl', | ||
photoURL: 'https://ghi.googleusercontent.com/jkl/profile_photo.png', | ||
clientInitialized: false, | ||
getIdToken: expect.any(Function), | ||
firebaseUser: null, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ export const createMockFirebaseUserClientSDK = () => ({ | |
uid: 'abc-123', | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-123-4567', | ||
displayName: 'Abc Cdf', | ||
photoURL: 'https://abc.googleusercontent.com/cdf/profile_photo.png', | ||
getIdToken: async () => 'my-id-token-abc-123', | ||
claims: {}, | ||
// ... other properties | ||
|
@@ -12,6 +15,9 @@ export const createMockFirebaseUserAdminSDK = () => ({ | |
uid: 'def-456', | ||
email: '[email protected]', | ||
email_verified: true, | ||
phone_number: '+1800-234-5678', | ||
name: 'Def Ghi', | ||
picture: 'https://def.googleusercontent.com/ghi/profile_photo.png', | ||
iss: 'https://securetoken.google.com/my-cool-app', | ||
aud: 'my-cool-app', | ||
auth_time: 1540000000, | ||
|
@@ -40,6 +46,9 @@ export const createMockSerializedAuthUser = ({ claims = {} } = {}) => | |
claims, | ||
email: '[email protected]', | ||
emailVerified: true, | ||
phoneNumber: '+1800-345-6789', | ||
displayName: 'Ghi Jkl', | ||
photoURL: 'https://ghi.googleusercontent.com/jkl/profile_photo.png', | ||
clientInitialized: false, | ||
_token: 'my-id-token-ghi-789', | ||
}) |