()
| 171 | * @throws {UserEmailNotVerifiedError} If the user's email is not verified. |
| 172 | */ |
| 173 | export function getVerifiedUser(): User { |
| 174 | const user = authService.getCurrentUser(); |
| 175 | if (user === null) { |
| 176 | throw new UserNotLoggedInError(); |
| 177 | } |
| 178 | if (!user.emailVerified) { |
| 179 | throw new UserEmailNotVerifiedError(); |
| 180 | } |
| 181 | return user; |
| 182 | } |
| 183 | |
| 184 | const authService = { |
| 185 | signUp, |
nothing calls this directly
no outgoing calls
no test coverage detected