(googleUser: gapi.auth2.GoogleUser)
| 133 | } |
| 134 | |
| 135 | private getUserFrom(googleUser: gapi.auth2.GoogleUser) { |
| 136 | const user = {} as User; |
| 137 | const profile = googleUser.getBasicProfile(); |
| 138 | |
| 139 | user.email = profile.getEmail(); |
| 140 | user.familyName = profile.getFamilyName(); |
| 141 | user.givenName = profile.getGivenName(); |
| 142 | user.id = profile.getId(); |
| 143 | user.imageUrl = profile.getImageUrl(); |
| 144 | user.name = profile.getName(); |
| 145 | |
| 146 | const authResponse = googleUser.getAuthResponse(true); |
| 147 | user.authentication = { |
| 148 | accessToken: authResponse.access_token, |
| 149 | idToken: authResponse.id_token, |
| 150 | refreshToken: '', |
| 151 | }; |
| 152 | |
| 153 | return user; |
| 154 | } |
| 155 | } |
no outgoing calls
no test coverage detected