mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-10-17 07:23:08 +01:00
Updated docs regarding Refresh of Tokens and fixed dead links
This commit is contained in:
parent
e5092ba779
commit
16ff9b8a7f
@ -37,3 +37,19 @@ static async void Main(string[] args)
|
|||||||
auth.OpenBrowser();
|
auth.OpenBrowser();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Token Refresh
|
||||||
|
|
||||||
|
Once the `AccessToken` is expired, you can use your `RefreshToken` to get a new one.
|
||||||
|
In this procedure, no HTTP Server is needed in the background and a single HTTP Request is made.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
// Auth code from above
|
||||||
|
|
||||||
|
if(token.IsExpired())
|
||||||
|
{
|
||||||
|
Token newToken = await auth.RefreshToken(token.RefreshToken);
|
||||||
|
api.AccessToken = newToken.AccessToken
|
||||||
|
api.TokenType = newToken.TokenType
|
||||||
|
}
|
||||||
|
```
|
@ -20,9 +20,9 @@ Now you can start with the user-authentication, Spotify provides 3 ways (4 if yo
|
|||||||
|
|
||||||
* [TokenSwapAuth](/auth/token_swap.md) (**Recommended**, server-side code mandatory, most secure method. The necessary code is shown here so you do not have to code it yourself.)
|
* [TokenSwapAuth](/auth/token_swap.md) (**Recommended**, server-side code mandatory, most secure method. The necessary code is shown here so you do not have to code it yourself.)
|
||||||
|
|
||||||
* [AutorizationCodeAuth](/auth/autorization_code.md) (Not recommended, server-side code needed, else it's unsecure)
|
* [AutorizationCodeAuth](/auth/authorization_code.md) (Not recommended, server-side code needed, else it's unsecure)
|
||||||
|
|
||||||
* [ClientCredentialsAuth](/auth/client_credentials_auth.md) (Not recommended, server-side code needed, else it's unsecure)
|
* [ClientCredentialsAuth](/auth/client_credentials.md) (Not recommended, server-side code needed, else it's unsecure)
|
||||||
|
|
||||||
Overview:
|
Overview:
|
||||||
![Overview](http://i.imgur.com/uf3ahTl.png)
|
![Overview](http://i.imgur.com/uf3ahTl.png)
|
||||||
|
Loading…
Reference in New Issue
Block a user