You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-16Lines changed: 57 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ githubkit supports **both pydantic v1 and v2**, but pydantic v2 is recommended.
81
81
82
82
## Quick Start
83
83
84
-
Here is some common use cases to help you get started quickly. For more detailed usage, please refer to the [Usage](#usage) section.
84
+
Here is some common use cases to help you get started quickly. The following examples are written in sync style, you can also use async style by using functions with `async_` prefix. For more detailed usage, please refer to the [Usage](#usage) section.
85
85
86
86
> APIs are fully typed. Type hints in the following examples are just for reference only.
### Develop an OAuth APP (GitHub APP) with web flow
105
105
106
+
OAuth web flow allows you to authenticate as a user and act on behalf of the user.
107
+
108
+
Note that if you are developing a GitHub APP, you may opt-in / opt-out of the user-to-server token expiration feature. If you opt-in, the user-to-server token will expire after a certain period of time, and you need to use the refresh token to generate a new token. In this case, you need to do more work to handle the token refresh. See [GitHub Docs - Refreshing user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/refreshing-user-access-tokens) for more information.
109
+
110
+
If you are developing an OAuth APP or a GitHub APP without user-to-server token expiration:
111
+
106
112
```python
107
113
from githubkit.versions.latest.models import PublicUser, PrivateUser
108
114
from githubkit import GitHub, OAuthAppAuthStrategy, OAuthTokenAuthStrategy
0 commit comments