-
-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oauth2 outside the praw #2021
Comments
Why are you handling oauth2 outside of PRAW? As for instantiating PRAW with just a access token, see here: #2012 (comment) |
We need users to log in and connect their Reddit accounts using their access tokens. It's not ideal for each user to generate a client ID and secret, beside not all users are techy :-) . This is a common use case for OAuth2 authentication. |
PRAW supports this oauth 2 flow already. See here for more details on how this works. |
Thanks, but still not clear, let me clarify my setup: I use a Reddit AI tool designed to search posts for AI agents. Note: The AI operations are managed through a job that executes at regular intervals. Your example didn't illustrate how to pass the refresh token or token to the praw instance. |
The usage of the refresh token is documented here. PRAW will automatically fetch a new access token with the refresh token right before the first network request is made. |
Describe the solution you'd like
When oauth2 is done outside the praw, we should be able to instantiate
praw.Reddit
only with access token, I am not sure if this is possible now, I can not find anything in the doc. the link Using a Saved Refresh Token it's not exactly the same thing.For the moment I just went with raw implementation
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: