Giter Club home page Giter Club logo

Comments (5)

lepture avatar lepture commented on May 18, 2024 1

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.

Lawouach avatar Lawouach commented on May 18, 2024

Okay so apparently, builtin cache is gone which makes the doc even less clear I'm afraid.

#23

I really wonder how to get a simplye GH client working with Flask :p

from authlib.

Lawouach avatar Lawouach commented on May 18, 2024

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.

Lawouach avatar Lawouach commented on May 18, 2024

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.

Lawouach avatar Lawouach commented on May 18, 2024

Thanks. I think that helped!

from authlib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.