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

RestSharp Access/Refresh Token #1015

Closed
YassIlhem opened this issue Sep 29, 2017 · 7 comments
Closed

RestSharp Access/Refresh Token #1015

YassIlhem opened this issue Sep 29, 2017 · 7 comments
Labels

Comments

@YassIlhem
Copy link

I have an WPF application. Using the RestSharp library, I was able to retrieve an access token and a refresh token. Can you tell me how to save this refresh token and use it to generate a new access token? I am stuck at this stage, if you have an example C# I will be very grateful to be able to advance.

@alexeyzimarev
Copy link
Member

This looks like a question. What is your issue exactly? Have you found a bug?

@YassIlhem
Copy link
Author

No the Response.Content contains the access_token and the refresh_token .... , but I want to know, for a WPF application, where can I save my refresh token? and how to use it to generate an access token if the first one is expired. (A client application sample)

@alexeyzimarev
Copy link
Member

alexeyzimarev commented Sep 29, 2017

I think questions are better asked on StackOverflow, which has much wider audience than the Github repository.

@YassIlhem
Copy link
Author

It is already done, but I have had no return.
I said, maybe, there will be someone here who has already done it

@rcollette
Copy link

The OAuth spec doesn't dictate the storage mechanism for tokens. Generally you'll find most frameworks that provide refresh managers will provide some hook/callback to store and retrieve tokens. (ex. the somewhat defunct DotNetOpenAuth).

@alexeyzimarev
Copy link
Member

@YassIlhem RestSharp is just a library to make HTTP calls. You should handle tokens yourself, or as @rcollette mentioned use features of the server-side implementation, if it provides any SDK.

@YassIlhem
Copy link
Author

@alexeyzimarev @rcollette thanks for the replay, i used the project's Properties, where i create String and i saved them .. The RestCharp Library works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants