Skip to content

Commit

Permalink
Update print message in sample to be assertionFailure
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmathias committed Sep 13, 2024
1 parent 20da986 commit 05b8ac9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ final class GoogleSignInAuthenticator: ObservableObject {
guard let idToken = signInResult.user.idToken?.tokenString,
let returnedNonce = self.decodeNonce(fromJWT: idToken),
returnedNonce == manualNonce else {
print("ERROR: Returned nonce doesn't match manual nonce!")
// Assert a failure for convenience so that integration tests with thissample app fail upon
// `nonce` mismatch
assertionFailure("ERROR: Returned nonce doesn't match manual nonce!")
return
}
self.authViewModel.state = .signedIn(signInResult.user)
Expand Down

0 comments on commit 05b8ac9

Please sign in to comment.