Describe the bug
Passing OtpType.invite as type on the GoTrueClient.resend method throws an assertion method
dart:core _AssertionError._throwNew
package:gotrue/src/gotrue_client.dart 564:14 GoTrueClient.resend
test/src/supabase/supabase_client_test.dart 29:25 main.<fn>
'package:gotrue/src/gotrue_client.dart': Failed assertion: line 564 pos 14: '[OtpType.signup, OtpType.emailChange].contains(type)': email must be provided for type invite
The auth-js package doesn't support that otp type as well. From what I see from this pr https://github.com/supabase/auth-js/pull/631 I think you just have to call the inviteUserByEmail method again.
Describe the bug Passing
OtpType.invite
as type on theGoTrueClient.resend
method throws an assertion methodTo Reproduce Steps to reproduce:
Dart unit test
```dart import 'package:flutter_test/flutter_test.dart'; import 'package:supabase_flutter/supabase_flutter.dart'; void main({ String supabaseUrl = 'http://localhost:54321', String supabaseServiceRoleKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm' '9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJ' 'syH-qQwv8Hdp7fsn3W0YpN81IU', }) { late SupabaseClient supabase; setUp(() async { supabase = SupabaseClient( supabaseUrl, supabaseServiceRoleKey, authOptions: AuthClientOptions( pkceAsyncStorage: FakeStorageClient(), ), ); }); test('Resend invite OTP should work', () async { await supabase.auth.admin.inviteUserByEmail('fake.user@mail.com'); // Waiting a bit to not trigger the rate limit. await FutureExpected behavior Calling the method should complete successfully and a new OTP should be sent out.
Version: On Linux/macOS ├── supabase_flutter 2.2.0 │ ├── supabase 2.0.4 │ │ ├── functions_client 2.0.0 │ │ ├── gotrue 2.3.0 │ │ ├── postgrest 2.1.0 │ │ ├── realtime_client 2.0.0 │ │ ├── storage_client 2.0.0
Supabase CLI 1.157.2