Skip to content

Commit

Permalink
docs: remove starlette.config.Config from docs via #612
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Dec 18, 2024
1 parent 5a0ca3c commit 27fb1fd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ parts
.installed.cfg
docs/_build
htmlcov/
.venv/
venv/
.tox
.coverage*
Expand Down
20 changes: 0 additions & 20 deletions docs/client/starlette.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,6 @@ first, let's create an :class:`OAuth` instance::
The common use case for OAuth is authentication, e.g. let your users log in
with Twitter, GitHub, Google etc.

Configuration
-------------

Starlette can load configuration from environment; Authlib implementation
for Starlette client can use this configuration. Here is an example of how
to do it::

from starlette.config import Config

config = Config('.env')
oauth = OAuth(config)

Authlib will load ``client_id`` and ``client_secret`` from the configuration,
take google as an example::

oauth.register(name='google', ...)

It will load **GOOGLE_CLIENT_ID** and **GOOGLE_CLIENT_SECRET** from the
environment.

Register Remote Apps
--------------------

Expand Down

0 comments on commit 27fb1fd

Please sign in to comment.