Because having passwords stored in your computer in plaintext is bad practice I implemented an automatic way to authenticate using oauth2 refresh tokens.
this makes it so you need to run an authentication script (auth.py) once and give permissions from your browser. then you can run the other scripts indefinitely using the refresh token you obtained.
this however, requires the reddit app to be a web app and not a script. (hence the branch name)
read more here
also added a .gitignore to ignore .refresh_token.txt and __pycache__
I'm not familiar with how streamable works but if it uses oauth2 it might be possible to create refresh token authentification for that too.
let me know what you think! :-)
edit: oh also i forgot to ask what scope the app needs. I set it as identity,read,submit but I'm not sure
changelog
created new files auth.py and server.py
created .gitignore
changed praw.Reddit authentication method in bot_streamable.py
Because having passwords stored in your computer in plaintext is bad practice I implemented an automatic way to authenticate using oauth2 refresh tokens.
this makes it so you need to run an authentication script (
auth.py
) once and give permissions from your browser. then you can run the other scripts indefinitely using the refresh token you obtained.this however, requires the reddit app to be a web app and not a script. (hence the branch name) read more here
also added a
.gitignore
to ignore.refresh_token.txt
and__pycache__
I'm not familiar with how streamable works but if it uses oauth2 it might be possible to create refresh token authentification for that too.
let me know what you think! :-)
edit: oh also i forgot to ask what scope the app needs. I set it as
identity
,read
,submit
but I'm not surechangelog
auth.py
andserver.py
.gitignore
praw.Reddit
authentication method inbot_streamable.py
sys
,socket
,random