Skip to content

Commit 6d07a99

Browse files
committed
DOC: Add windows keyring backend documentation
1 parent ecf12fd commit 6d07a99

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,33 @@ If you use conda:
133133
$ conda install -c conda-forge msal_requests_auth
134134
135135
136+
Windows keyring backend
137+
~~~~~~~~~~~~~~~~~~~~~~~~
138+
139+
The Windows Credential Locker is used by default by ``keyring``.
140+
However, its password length limitations often prevent
141+
storing tokens. An alternative backend may resolve this limitation.
142+
When choosing a backend, be sure you are aware of its limitations.
143+
144+
``keyrings.alt`` is an alternative ``keyring`` backend to consider:
145+
146+
.. code-block:: console
147+
148+
python -m pip install keyrings.alt
149+
150+
151+
Here is an example of how to set an alternative backend for ``keyring``:
152+
153+
.. code-block:: python
154+
155+
import keyring
156+
157+
keyring.core._config_path().parent.mkdir(parents=True, exist_ok=True)
158+
keyring.core._config_path().write_text(
159+
"[backend]\ndefault-keyring=keyrings.alt.Windows.EncryptedKeyring"
160+
)
161+
162+
136163
Credits
137164
-------
138165

0 commit comments

Comments
 (0)