Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gotrue): Set _currentUser when setting initial session #806

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

dshukertjr
Copy link
Member

What kind of change does this PR introduce?

Currently when the supabase_flutter SDK obtains the initial session from local storage and calls setInitialSession() method of gotrue, the _currentUser is not set causing a state where auth.currentSession is not null, but auth.currentUser being null. This PR fixes it.

Related #805

@elliottetzkorn
Copy link
Contributor

elliottetzkorn commented Jan 22, 2024

Realizing that I was relying on currentUser and not currentSession for my UI management. This is honestly probably the root of all my issues here #805.

@dshukertjr dshukertjr merged commit 042f3c6 into main Jan 22, 2024
9 checks passed
@dshukertjr dshukertjr deleted the fix/initial-user branch January 22, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants