Submit templates for repl.it/templates here.

← Back to all posts
Login with Discord Template
ssebastianoo

A Python Flask app that makes people login with Discord using OAUTH2 lib.

Voters
Herobrinelgg
gavinwinsagain
rediar
AgastyaSandhuja
frissyn
ssebastianoo
Comments
hotnewtop
Iiiwiw882yahajs


gavinwinsagain

Noice

gavinwinsagain

How do I set this up when I remix it doesn’t work?

ssebastianoo

@gavinwinsagain line 8 change base_url and create a .env with OAUTH2_CLIENT_ID = your_client_id and OAUTH2_CLIENT_SECRET = your_client_secret

^ take them from the Discord dev portal

gavinwinsagain
gavinwinsagain

So when I did this now it says “invalid 0AUTH2” redirect @ssebastianoo

AgastyaSandhuja

cool! How would i get the profile picture?

ssebastianoo

hello, go on /me and you can find your avatar in Bytes @AgastyaSandhuja. You can get it with user["avatar"]

AgastyaSandhuja

ok thanks @ssebastianoo