Skip to content

Commit

Permalink
fix: Ignore email and phone assertions when token hash is being verified
Browse files Browse the repository at this point in the history
  • Loading branch information
sarvesh-dalvi-1 committed Dec 10, 2024
1 parent ccfcbf5 commit 9dd3e22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gotrue/lib/src/gotrue_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ 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 9dd3e22

Please sign in to comment.