-
-
Notifications
You must be signed in to change notification settings - Fork 213
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Version
2.37.0
Platform
iOS
Swift Version
6.0
What happened?
The issue is similar to
supabase/auth-js#349
Steps to Reproduce
- Import Supabase
- Create a client
supabase = SupabaseClient(supabaseURL: ..., supabaseKey: ...) - Create a user (can do manually in Supabase UI)
- Run a task which will track auth events (can do in AppModel)
Task {
for await (event, session) in supabase.auth.authStateChanges {
await MainActor.run {
switch event {
case .initialSession:
print(event.rawValue)
case .passwordRecovery:
print(event.rawValue)
case .signedIn:
print(event.rawValue)
case .signedOut:
print(event.rawValue)
case .tokenRefreshed:
print(event.rawValue)
default:
break
}
}
}
}- Trigger sending a recovery email
try await supabase.auth.resetPasswordForEmail(email)- Call OTP verification by the token
try await supabase.auth.verifyOTP(email: email, token: emailConfirmationCode, type: .recovery)- Check the event type received
Expected Behaviour:
event = passwordRecovery
Code Sample
Relevant log output
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
