supabase / gotrue-dart

A dart client library for GoTrue.
MIT License
46 stars 37 forks source link

properly handle completer #134

Closed dshukertjr closed 1 year ago

dshukertjr commented 1 year ago

What kind of change does this PR introduce?

Completers are used in gotrue client to be able to retry token refresh and return the final retry result, but currently the result of _callRefreshToken are directly being returned.

This PR makes _callRefreshToken void and makes sure that the result of the completer are returned for those that needs to refresh the session.

Vinzent03 commented 1 year ago

When using this pr as gotrue version in supabase-flutter, the test still fails... 🤔

dshukertjr commented 1 year ago

@Vinzent03 Thank for quickly identifying the cause of the failing tests! Yeah, this PR is kind of unrelated, but wanted to fix it. I think we want that addError there though, right?

Vinzent03 commented 1 year ago

@dshukertjr Found the issue https://github.com/supabase/supabase-dart/pull/187 So this can be merged.

dshukertjr commented 1 year ago

@Vinzent03 ah, sorry, missed that one! You're awesome!

Vinzent03 commented 1 year ago

You didn't miss it, it's brand new xD