Describe the bug
After restarting the app Supabase returns currentUser as null while the currentUser is valid and contains User object (with all user's metadata, accessToken, etc.).
To Reproduce
Steps to reproduce the behavior:
Login with valid credentials (Supabase function signInWithPassword)
Close the app and wait for the token to expire
Re-open the app
Supabase currentUser is null but the currentSession is not null
Expected behavior
Current user should display the same user value as inside the currentSession object.
Version (please complete the following information):
On MacOS
├── supabase_flutter 2.0.2
│ ├── supabase 2.0.2
│ │ ├── functions_client 2.0.0
│ │ ├── gotrue 2.1.0
│ │ ├── postgrest 2.0.1
│ │ ├── realtime_client 2.0.0
│ │ ├── storage_client 2.0.0
Flutter doctor:
[✓] Flutter (Channel stable, 3.19.2, on macOS 14.3.1 23D60 darwin-arm64, locale en-SI)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] Android Studio (version 2022.2)
[✓] Android Studio (version 2023.1)
[✓] Connected device (3 available)
[✓] Network resources
Describe the bug After restarting the app Supabase returns
currentUser
asnull
while thecurrentUser
is valid and containsUser
object (with all user's metadata, accessToken, etc.).To Reproduce Steps to reproduce the behavior:
signInWithPassword
)currentUser
is null but thecurrentSession
is not nullExpected behavior Current user should display the same user value as inside the
currentSession
object.Version (please complete the following information): On MacOS ├── supabase_flutter 2.0.2 │ ├── supabase 2.0.2 │ │ ├── functions_client 2.0.0 │ │ ├── gotrue 2.1.0 │ │ ├── postgrest 2.0.1 │ │ ├── realtime_client 2.0.0 │ │ ├── storage_client 2.0.0
Flutter doctor: [✓] Flutter (Channel stable, 3.19.2, on macOS 14.3.1 23D60 darwin-arm64, locale en-SI) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.2) [✓] Android Studio (version 2022.2) [✓] Android Studio (version 2023.1) [✓] Connected device (3 available)
[✓] Network resources