Skip to content

Commit

Permalink
Update related authentication documentation page
Browse files Browse the repository at this point in the history
(cherry picked from commit bb0e000c566451605aa5f044057b37af3d6fa920)
  • Loading branch information
bboe authored and LilSpazJoekp committed Feb 25, 2021
1 parent c1b3ec7 commit ea9f683
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions docs/getting_started/authentication.rst
Expand Up @@ -3,7 +3,7 @@
Authenticating via OAuth
========================

Async PRAW supports the three types of applications that can be registered on
Async PRAW supports all three types of applications that can be registered on
Reddit. Those are:

* `Web Applications <https://github.com/reddit-archive/reddit/wiki/OAuth2-App-Types#web-app>`_
Expand All @@ -14,10 +14,10 @@ Before you can use any one of these with Async PRAW, you must first `register
<https://www.reddit.com/prefs/apps/>`_ an application of the appropriate type
on Reddit.

If your app does not require a user context, it is :ref:`read-only <read_only_application>`.
If your application does not require a user context, it is :ref:`read-only <read_only_application>`.

Async PRAW supports the flows that each of these applications can use. The
following table defines which tables can use which flows:
following table defines which application types can use which flows:

.. rst-class:: center_table_items

Expand Down Expand Up @@ -133,8 +133,8 @@ If you aren't actually running a website, you can follow the :ref:`refresh_token
tutorial to learn how to obtain and use the
initial refresh token.

Whether or not you use the script there are two processes involved in obtaining
access or refresh tokens.
Whether or not you follow the :ref:`refresh_token` tutorial there are two processes
involved in obtaining access or refresh tokens.

.. _auth_url:

Expand All @@ -152,13 +152,15 @@ URL. You can do that as follows:
user_agent="testscript by u/fakebot3")
print(reddit.auth.url(["identity"], "...", "permanent"))
The above will output an authorization URL for a permanent token that has only
the `identity` scope. See :meth:`.url` for more information on these
The above will output an authorization URL for a permanent token (i.e., the resulting
authorization will include both a short-lived ``access_token``, and a longer-lived, single
use ``refresh_token``)that has only
the ``identity`` scope. See :meth:`.url` for more information on these
parameters.

This URL should be accessed by the account that desires to authorize their
Reddit access to your application. On completion of that flow, the user's
browser will be redirected to the specified ``redirect_uri``. After extracting
browser will be redirected to the specified ``redirect_uri``. After
verifying the ``state`` and extracting the ``code`` you can obtain the refresh
token via:

Expand All @@ -171,7 +173,7 @@ The first line of output is the ``refresh_token``. You can save this for later
use (see :ref:`using_refresh_tokens`).

The second line of output reveals the name of the Redditor that completed the
code flow. It also indicates that the ``reddit`` instance is now associated
code flow. It also indicates that the :class:`.Reddit` instance is now associated
with that account.

The code flow can be used with an **installed** application just as described
Expand Down

0 comments on commit ea9f683

Please sign in to comment.