Comments (5)
I've updated the documentation so that you can understand what are fetch_token
and update_token
.
https://docs.authlib.org/en/latest/client/frameworks.html
BTW, don't use flask.ext.*
, use flask_*
instead.
from authlib.
Okay so apparently, builtin cache is gone which makes the doc even less clear I'm afraid.
I really wonder how to get a simplye GH client working with Flask :p
from authlib.
Right, so I should have probably pay attention to the version I was running. It was 0.4. After updating, and passing a Flask-Cache instance, I was able to get it to work!
For the record, I am using now:
from flask.ext.cache import Cache
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
oauth = OAuth(
app, cache=cache, fetch_token=fetch_token_info,
update_token=update_token)
I'll let you decide if this the doc is clear enough on this subject :)
from authlib.
I might be wrong but it seems that the update_token is not used anywhere, is it?
Also, fetch_token never seems to be called either.
What are they used for?
from authlib.
Thanks. I think that helped!
from authlib.
Related Issues (20)
- OAuth1 HMAC-SHA256 signature method HOT 2
- Delete/remove client method (flask client) HOT 2
- Attempts to call "auth_method", a string.
- Can't have more than 1 oauth client registered HOT 1
- Should `generate_token` not be using `secrets.SystemRandom` instead of `random.SystemRandom`? HOT 4
- Client ID containing a colon doesn't work with OAuth2's client_secret_basic authentication method
- Next tag / release HOT 1
- How to check for JWT expiration without checking the signature?
- Enhancement: Litestar OAuth Client
- In Django projects ResourceProtector not able to decorate unclude('urls') or class methods. (solution provided)
- request to fix illogical and redundant code in ResourceProtector (solution provided).
- Allow the instance of ResourceProtector to be a decorator without an unnecessary call if we don't have any 'call' attribute, solution provided.
- InvalidClaimError "iss" because "options" inconsistent with "option_values" when using Azure's OAuth (templated endpoint) HOT 1
- Add several different public keys for one Tokenvalidator, or allow several Validators for one auth_type in ResourceProtector
- JWTBearerTokenGenerator.generate - can not able to generate token with expires_in=0
- JWTBearerTokenValidator don't send parameters now and leeway to claim.validate
- ask to transform inline function "load_key" to method of OpenIDMixin
- Documentation for FastAPI/Starlette for Oauth2 is incorrect/misleading/confusing? HOT 3
- Drop `starlette.config.Config` from the Starlette integration
- Support for OIDC4VC standards
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 authlib.