We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fc2e2a commit 22b8f27Copy full SHA for 22b8f27
Sources/OAuth2Client/NXOAuth2Client.m
@@ -119,7 +119,11 @@ - (void)setAccessToken:(NXOAuth2AccessToken *)value;
119
120
- (void)requestAccess;
121
{
122
- if (username != nil && password != nil) { // username password flow
+ if (self.accessToken) {
123
+ if (self.accessToken.hasExpired){
124
+ [self refreshAccessToken];
125
+ }
126
+ } else if (username != nil && password != nil) { // username password flow
127
[self requestTokenWithUsernameAndPassword];
128
} else { // web server flow
129
NSAssert(redirectURL, @"Web server flow without redirectURL");
0 commit comments