Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using with Desktop client (Winform/WPF) #22

Closed
rajputs6 opened this issue May 17, 2019 · 1 comment
Closed

Using with Desktop client (Winform/WPF) #22

rajputs6 opened this issue May 17, 2019 · 1 comment

Comments

@rajputs6
Copy link

Please suggest how can we use it with Winform /wpf client . What will be code value in this case for PinSharpAuthClient.GetAccessTokenAsync

@Krusen
Copy link
Owner

Krusen commented May 18, 2019

  1. Build an authorization URL.
var authUrl = PinSharpAuthClient.BuildAuthorizationUrl("your-client-id", "https://your-site.com", PinSharp.Api.Scopes.ReadPublic);
  1. 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
  1. Get the access token using the code received from step 2.
var accessToken = PinSharpAuthClient.GetAccessTokenAsync("your-client-id", "your-client-secret", code);

@Krusen Krusen closed this as completed Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants