ramsayleung / rspotify

Spotify Web API SDK implemented on Rust
MIT License
632 stars 121 forks source link

Bug Fix: Set refresh token to new access token before `callback_fn` is called #434

Closed JoeyEamigh closed 1 year ago

JoeyEamigh commented 1 year ago

Description

callback_fn was not returning the refresh token in AuthCodeSpotify, so I simply moved the token.refresh_token = Some(refresh_token.to_string()); above the callback_fn directive to solve this problem.

Motivation and Context

Refresh token was not being returned after refetch_token was called.

Type of change

Please delete options that are not relevant.

How has this been tested?

I used it in my project and it does work. It is a two line

Is this change properly documented?

I figure this can be done once the PR is in.

Thanks for the great library!

ramsayleung commented 1 year ago

Thanks for your contribution :)