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 _save_session's default behavior #610

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

canrobins13
Copy link

What kind of change does this PR introduce?

This PR fixes a bug where client.set_session(access_token, refresh_token) doesn't actually update the in-memory session. This can be easily seen by creating a client and calling set_session followed by get_session. The set_session call appears to work and returns a valid response, but the subsequent get_session call returns None, revealing that the session was never set properly.

As a workaround, you can set persist_session to False in the client options, but this shouldn't be necessary.

What is the current behavior?

set_session does not properly update the in-memory session when the persist_session option is True (default).

This issue was closed although the bug still exists #324

What is the new behavior?

set_session works.

@silentworks
Copy link
Contributor

There is no issue with this functionality. I've tested this in the latest version and its all working as expected. I've attached a view showing this working.

Please turn your volume down as my voice might be a bit loud in the recording.

supabase-py_set_session.mp4

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.

2 participants