Skip to content

Commit

Permalink
fix: Ignore email and phone assertions when token hash is being verif…
Browse files Browse the repository at this point in the history
…ied (#1097)

Co-authored-by: sarvesh_dalvi <[email protected]>
  • Loading branch information
Dastaan2k and sarvesh-dalvi-1 authored Dec 12, 2024
1 parent 4e35115 commit c971786
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/gotrue/lib/src/gotrue_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,10 @@ class GoTrueClient {
String? captchaToken,
String? tokenHash,
}) async {
assert((email != null && phone == null) || (email == null && phone != null),
assert(
((email != null && phone == null) ||
(email == null && phone != null)) ||
(tokenHash != null),
'`email` or `phone` needs to be specified.');
assert(token != null || tokenHash != null,
'`token` or `tokenHash` needs to be specified.');
Expand Down

0 comments on commit c971786

Please sign in to comment.