Skip to content

Commit

Permalink
Update docs/getting_started/authentication.rst
Browse files Browse the repository at this point in the history
Co-authored-by: Joel Payne <15524072+LilSpazJoekp@users.noreply.github.com>

(cherry picked from commit praw-dev/praw@72febb5)
  • Loading branch information
jghaines authored and LilSpazJoekp committed Nov 1, 2021
1 parent 2820e80 commit 3692583
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
8 changes: 4 additions & 4 deletions docs/getting_started/authentication.rst
Expand Up @@ -27,10 +27,10 @@ table defines which application types can use which flows:
.. warning::

For the sake of brevity, the following examples pass authentication information via
arguments to :py:func:`asyncpraw.Reddit`. If you do this, you need to be careful not
to reveal this information to the outside world if you share your code. It is
recommended to use a :ref:`praw.ini file <praw.ini>` in order to keep your
authentication information separate from your code.
arguments to :class:`.Reddit`. If you do this, you need to be careful not to reveal
this information to the outside world if you share your code. It is recommended to
use a :ref:`praw.ini file <praw.ini>` in order to keep your authentication
information separate from your code.

.. _password_flow:

Expand Down
12 changes: 7 additions & 5 deletions docs/tutorials/refresh_token.rst
Expand Up @@ -75,16 +75,18 @@ The following program can be used to obtain a refresh token with the desired sco
.. literalinclude:: ../examples/obtain_refresh_token.py
:language: python

This script assumes you have configured your application's ``redirect uri`` to ``localhost:8080``
This script assumes you have configured your application's ``redirect uri`` to
``localhost:8080``

When you execute this script interactively:

- You will be prompted for a comma-separated list of scopes
- You will be given a URL that will take you through the auth follow
- Reddit will ask you for user authentication and ask you to grant the application permissions
- Reddit will ask you for user authentication and ask you to grant the application
permissions
- On completion, the user will have a new authorized application configured
- A refresh token is displayed in the browser and on the command line

You only have to run this script once for each refresh token. The refresh token
(along with the application's client_id, client_secret) are valid credentials until
manually revoked by the user.
You only have to run this script once for each refresh token. The refresh token (along
with the application's client_id, client_secret) are valid credentials until manually
revoked by the user.

0 comments on commit 3692583

Please sign in to comment.