supabase-community / gotrue-swift

A Swift client library for GoTrue.
MIT License
36 stars 31 forks source link

Refresh session object after "refreshSession" method is called #12

Closed AngCosmin closed 2 years ago

AngCosmin commented 2 years ago

Hello 👋

The refreshSession method is not really refreshing the session. It is calling the endpoint to refresh the session but the session object is not updated when the response is received.

There is no way to update the session object when you force refresh the token using the refreshSession method.

In this PR I also updated the session object when the refresh is made.

Thanks, Cosmin