[GH-ISSUE #240] How to keep user signed in ? #136

Closed
opened 2026-03-03 16:45:59 +03:00 by kerem · 5 comments
Owner

Originally created by @ghost on GitHub (Jun 22, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/240

What should I do if token expires ? Is there a way to get new token without forcing user to re-enter his login and password ?

Originally created by @ghost on GitHub (Jun 22, 2016). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/240 What should I do if token expires ? Is there a way to get new token without forcing user to re-enter his login and password ?
kerem 2026-03-03 16:45:59 +03:00
Author
Owner

@phimage commented on GitHub (Jun 22, 2016):

Oauth2 or oauth1?
Look for "renew" process

<!-- gh-comment-id:227680591 --> @phimage commented on GitHub (Jun 22, 2016): Oauth2 or oauth1? Look for "renew" process
Author
Owner

@ghost commented on GitHub (Jun 22, 2016):

oauth2
tried looking, but didnt find anything useful :(

<!-- gh-comment-id:227690290 --> @ghost commented on GitHub (Jun 22, 2016): oauth2 tried looking, but didnt find anything useful :(
Author
Owner

@phimage commented on GitHub (Jun 22, 2016):

There is a pr for automatic renew that could not be merged
But you can do it by making a request, see your oauth provider doc

<!-- gh-comment-id:227702192 --> @phimage commented on GitHub (Jun 22, 2016): There is a pr for automatic renew that could not be merged But you can do it by making a request, see your oauth provider doc
Author
Owner

@antwerpenR commented on GitHub (Jun 22, 2016):

@archiewahwah I have found that the auto renewal generally does work. When it fails you will get a error.code of 401 and you can try the call again and it will work. I guess the foolproof way to do it is to use:
'renewAccesstokenWithRefreshToken(refreshToken: String, success: TokenSuccessHandler, failure: FailureHandler?)'

<!-- gh-comment-id:227703238 --> @antwerpenR commented on GitHub (Jun 22, 2016): @archiewahwah I have found that the auto renewal generally does work. When it fails you will get a error.code of 401 and you can try the call again and it will work. I guess the foolproof way to do it is to use: 'renewAccesstokenWithRefreshToken(refreshToken: String, success: TokenSuccessHandler, failure: FailureHandler?)'
Author
Owner

@phimage commented on GitHub (Jul 7, 2016):

"expire in" date must be checked and renewAccesstokenWithRefreshToken used

(one day automatic renew will be merged I hope)

<!-- gh-comment-id:230993859 --> @phimage commented on GitHub (Jul 7, 2016): "expire in" date must be checked and `renewAccesstokenWithRefreshToken` used (one day automatic renew will be merged I hope)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#136
No description provided.