Skip to content

Commit c971786

Browse files
fix: Ignore email and phone assertions when token hash is being verified (#1097)
Co-authored-by: sarvesh_dalvi <[email protected]>
1 parent 4e35115 commit c971786

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/gotrue/lib/src/gotrue_client.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,10 @@ class GoTrueClient {
533533
String? captchaToken,
534534
String? tokenHash,
535535
}) async {
536-
assert((email != null && phone == null) || (email == null && phone != null),
536+
assert(
537+
((email != null && phone == null) ||
538+
(email == null && phone != null)) ||
539+
(tokenHash != null),
537540
'`email` or `phone` needs to be specified.');
538541
assert(token != null || tokenHash != null,
539542
'`token` or `tokenHash` needs to be specified.');

0 commit comments

Comments
 (0)