authlib / authlib/demo-oauth-client

Refresh token documentation

Open
#26 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
287
Forks
102
PR merge metrics
No merged PRs in 30d

Description

Please update the documentation on refresh token at
https://docs.authlib.org/en/latest/client/frameworks.html
or
https://docs.authlib.org/en/latest/client/flask.html
as per the suggested solution at
https://stackoverflow.com/questions/62293888/obtaining-and-storing-refresh-token-using-authlib-with-flask

Parameter to specify add in the remote application as per
" .. The first step is register a remote application on the OAuth registry via oauth.register method "
at https://docs.authlib.org/en/latest/client/flask.html
to obtain retrieve get the refresh token

is

authorize_params={'access_type': 'offline'}

```
google = oauth.register(
'google',
# ...
authorize_params={'access_type': 'offline'},
)
```
as per
https://stackoverflow.com/a/62296675

and

'prompt': 'consent' in the client_kwargs parameter in the remote application on the OAuth registry via oauth.register method

if required

`client_kwargs = {'prompt':'consent'}`
as per
https://stackoverflow.com/questions/62293888/obtaining-and-storing-refresh-token-using-authlib-with-flask#comment110182471_62296675


Thank you

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the OAuth client documentation at docs.authlib.org/en/latest/client/frameworks.html and docs.authlib.org/en/latest/client/flask.html, starting with the oauth.register example. Compare it with the linked Stack Overflow solution and document authorize_params={'access_type': 'offline'} and, when required, client_kwargs={'prompt': 'consent'}. Done means the relevant refresh-token instructions and example are clear in the documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
authentication, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.