Comments (5)
I was thinking about this, GitHub for example does not issue expires_in
. Best way would probably be to test if the token still works, which would require a URL. Could be a setting like token_test_url
or something.
(BTW I changed this log entry just recently to be more informative)
from oauth2.
yes Instagram Oauth2 implementation also does not send expires_in :
"Even though the access token does not specify an expiration time, your app should handle the case that either the user revokes access, or Instagram expires the token after some period of time. In this case, your meta of your responses will contain an “error_type=OAuthAccessTokenError”. In other words: do not assume your access_token is valid forever."
from oauth2.
reading this it might be best to use a combination of the suggested approaches for dealing with this, i.e. use an estimate for token expiry and a test at the end of that estimate if expiry is not supplied :
https://rnd.feide.no/2012/04/19/best-practice-for-dealing-with-oauth-2-0-token-expiration-at-the-consumer/
(excellent work on this lib by the way :)
from oauth2.
The develop branch now has accessTokenAssumeUnexpired
, which is true by default, to handle these cases.
from oauth2.
This is now in 1.2.7
.
from oauth2.
Related Issues (20)
- String to JOSN.parse() issue HOT 1
- Unidy Logout Issues
- authConfig.authorizeContext will not accept a UIWindow HOT 1
- Can I use this for "Sign in with Apple"? HOT 1
- Many 401s
- Clean OAuth2 token HOT 7
- How to wait oauth callback for triggering handleRedirectURL HOT 1
- Xcode 14 Beta will get "This method should not be called on the main thread as it may lead to UI unresponsiveness." warning HOT 1
- "invalid_grant" error in google authentication only for iOS 16 devices.
- mac catalyst can not open login window HOT 1
- App crashes if a token refresh occurs while in the background
- Crash on 'Cancel' in OAuth2Authorizer iOS HOT 1
- Force to use id_token instead of access_token HOT 1
- Keyhain: Access token lost after App Store update HOT 2
- not able to use this framework on widget extension HOT 1
- Project maintenance HOT 5
- VisionOS issue HOT 5
- Avoid using SafariViewController when token expires HOT 4
- Getting an error when building in a M1, using SPM and latest OAuth2 version available HOT 4
- Allow to specify an OAuth2Logger already during initialization
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth2.