Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align documentation with samples #32

Closed
Lawouach opened this issue Mar 2, 2018 · 5 comments
Closed

Align documentation with samples #32

Lawouach opened this issue Mar 2, 2018 · 5 comments

Comments

@Lawouach
Copy link

Lawouach commented Mar 2, 2018

Hey,

First of, thank you for this package! It's really useful.

I just wanted to report that the documentation is somtimes a bit lacking in places. I have been trying to use the Flask server support along with the GitHub integration and I keep getting a problem with the code being expired from GH.

I thought I'd look at the playground example but realised that it was quite different from the docs. There are aspects (like caching) that aren't setup as per the docs and it's unclear what needs to actually be done.

Is the current doc up to date and authoritative or should I derive from the playground?

Thanks,

@Lawouach
Copy link
Author

Lawouach commented Mar 2, 2018

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

@Lawouach
Copy link
Author

Lawouach commented Mar 2, 2018

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 :)

@Lawouach
Copy link
Author

Lawouach commented Mar 2, 2018

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?

lepture added a commit that referenced this issue Mar 4, 2018
@lepture
Copy link
Owner

lepture commented Mar 4, 2018

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.

@Lawouach
Copy link
Author

Lawouach commented Mar 5, 2018

Thanks. I think that helped!

@Lawouach Lawouach closed this as completed Mar 5, 2018
coopfeathy added a commit to coopfeathy/authlib-django that referenced this issue Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants