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

Split into admin and regular client. Minor doc fixes. Lock lang to 9.0 #66

Merged
merged 3 commits into from
Jun 23, 2023

Conversation

wiverson
Copy link
Collaborator

What kind of change does this PR introduce?

Splits the stateful client into two classes. The methods requiring the service_key have been moved to a new AdminClient class.

Also some minor documentation tweaks/fixes, and also sets the language level to 9.0 instead of latest to help keep language level compatibility (useful e.g. if using the sources in Unity).

What is the current behavior?

Right now the stateful client includes service_key methods. This doesn't really make a lot of sense, as the stateful client includes several features that don't make sense in a server environment (e.g. background refresh threads).

What is the new behavior?

The only state the AdminClient really includes is the ServiceKey. It's a bit higher level than just using the StatelessClient directly.

This is a breaking change, as the interfaces and implementation have changed. The AdminClient methods do not take the service key JWT as parameters - typically that would be set in the constructor.

I suspect this doesn't really affect the top-level client all that much, as I hope that most, say, Xamarin users are not compiling in their service keys into their client apps. A user can use the AdminClient directly in their server-side code - this is probably more of a documentation thing.

@acupofjose acupofjose merged commit bbf3307 into supabase-community:master Jun 23, 2023
1 check passed
@acupofjose
Copy link
Collaborator

Fantastic work as per usual. Thanks @wiverson!

This pull request was closed.
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