Using with Desktop client (Winform/WPF)
rajputs6 opened this issue · 1 comments
rajputs6 commented
Please suggest how can we use it with Winform /wpf client . What will be code value in this case for PinSharpAuthClient.GetAccessTokenAsync
Krusen commented
- Build an authorization URL.
var authUrl = PinSharpAuthClient.BuildAuthorizationUrl("your-client-id", "https://your-site.com", PinSharp.Api.Scopes.ReadPublic);
- Have your user open that URL in a browser.
- It will ask him to approve that your app can access his data.
- He will then be redirected to the provided redirect URL with a code in the query string,
e.g.https://your-site.com/?code=XXXXXXXXXXX
- Get the access token using the code received from step 2.
var accessToken = PinSharpAuthClient.GetAccessTokenAsync("your-client-id", "your-client-secret", code);