-
Notifications
You must be signed in to change notification settings - Fork 349
Adding method to request a refresh token #79
base: master
Are you sure you want to change the base?
Conversation
Hi Jimmy Do you have sample (minimal) sample for this pull request, please? thanks Mel |
Well, I did, but now it's broken because of #95. I'll see if I can't get a minimum example. |
Hey Jimmy Do not worry about iOS9. I have already changed info.plist for all samples. I just need to have sample for refresh token. regards Mel |
@jbogard any luck on getting a sample? |
Jimmy's code was added while ago, but during the work on the Evolve16 labs it was decided to be extracted into separate nuget Xamarin.Auth.Extensions which will depend on Xamarin.Auth. This decision was made based on discussion that Refresh Token requesting is not part of the standard and for some users it may raise security issues. The code is here: Nuget nuspec: Missing:
|
Anything I need to do on my side, or should I close this? |
Don't close it yet please. Do you have this old sample? I'd like to add it to the samples. |
@jbogard: Do you have the sample laying around somewhere? |
Nah, this was from an internal app. Just trying to get some time to build a On Tue, Sep 6, 2016 at 2:08 AM, Erlend Angelsen [email protected]
|
+1 for a sample that utilises refresh tokens please! |
Sorry for the rather late response on this, but I don't believe refresh tokens should be outside of the scope of Xamarun.Auth. First of all, refresh tokens are included in the main OAuth 2.0 specification / framework: https://tools.ietf.org/html/rfc6749#section-1.5 Refresh tokens are an integral part of the security that OAuth 2.0 offers. Without them you have to resort to access tokens with a long expiry and as access tokens cannot always be revoked, this potentially leaves a hole where an attacker could perform operations against a user's data without a way of resolving the issue. To clarify on my statement that access tokens cannot always be revoked, if you look at the OAuth 2.0 token revocation document (https://tools.ietf.org/html/rfc7009#section-2) you'll see that while you must be able to revoke refresh tokens, you only should be able to revoke access tokens. Google allow revocation of access tokens but they are a special case where the resource application is controlled by the identity provider. The OAuth 2.0 token revocation document goes into further details about the implementation of this (https://tools.ietf.org/html/rfc7009#section-3), but one of the key selling points of OAuth is that the access token can be self contained and therefore the resource server does not need to go back to the authorisation server in order to verify the token. This means that in a generic OAuth 2.0 implementation, the only point at which we can guarantee that the identity provider will be able to revoke a token is during a refresh. For this reason and because this library is a generic implementation and not Google / Facebook specific, there are a couple of things that I believe Xamarin.Auth should do in order to help users of this library ensure the security of their applications:
If implemented correctly, refresh tokens increase security rather than decreasing it. -Andrew. |
I finally have some time this week for a usage sample, hooray!
…On Mon, Dec 19, 2016 at 5:01 AM, Vinicius Cândido ***@***.***> wrote:
Hi @jbogard <https://github.com/jbogard> @moljac
<https://github.com/moljac> ! How have going this implementation? Could
please give a usage sample?
Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#79 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGYMomU9x1ZqEp4tHZydx7b9hAvbhwZks5rJmP2gaJpZM4C5zds>
.
|
I'm excited to see this publishing. Thanks @jbogard |
Is there a sample available showing how to refresh a token using Xamarin.Auth ? |
Any update on this? |
@jbogard I installed Xamarin.Auth.Extension on NuGet to use your method but ended up having these errors: |
What's the status of this PR? |
any update on this issue? |
I wrote a sample on my gist Hi, |
Xamarin.Auth.Extensions has a method "RequestRefreshTokenAsync" to refresh the token. However, it returns an integer value (expires_in). Shouldn't it also return the new access_token? |
1 similar comment
Xamarin.Auth.Extensions has a method "RequestRefreshTokenAsync" to refresh the token. However, it returns an integer value (expires_in). Shouldn't it also return the new access_token? |
Closes #47. You still typically need to subclass and override GetInitialUrlAsync:
But I found that method varied per OAuth provider a bit, and I still want other changes so I didn't bother messing with the URI.