supabase / gotrue-dart

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

Use correct token for refreshing #104

Closed imcvampire closed 2 years ago

imcvampire commented 2 years ago

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

Currently, the lib uses refreshToken but it may be null. There is a check in the first line and we should use that variable.

What is the new behavior?

Use token (which is refreshToken ?? currentSession?.refreshToken) instead of refreshToken

Additional context

imcvampire commented 2 years ago

@dshukertjr Thank you! I'm wondering when we can release a new version with this fix?

dshukertjr commented 2 years ago

@imcvampire Will release an update in a day or two!