Coder Social home page Coder Social logo

discordoauth2's Introduction

DiscordOAuth

This was made for testing purposes by @dnorhoj#1337 The idea is that the source is available, so that people doesn't have to try their way through like I am while making this.

How to install

Guide to setting up the application.

Create app

First go to discord developer portal. Then click on the New Application button.

Give the application a name, and click Create. Give it a description if you feel like it.

Write down the client id and client secret, we will need it later.

Set up OAuth

Navigate to the OAuth2 section.

Click Add Redirect and in the box type in localhost:8000/callback and save.

Configure the code

Clone the source, and open it up in a text editor.

Create a file called auth.py in the source folder. Copy+paste this and change what you need to:

id = '[Put Client ID here]'
secret = '[Client Secret]'
secretkey = "[A random string of chars]"
redirect = 'http://localhost:8000/callback'
scopes = 'email identify guilds'

Install requirements

Before continuing, you need to have the following requirements:

  • Python 3
  • Pip

To install the requirements, simply open a cmd/terminal window and navigate to the source code directory.

Now do pip install -r requirements.txt

Start the app

Now launch main.py in a command window. It should start the flask application.

Go to localhost:8000 in your browser.

More

Have a good day.

discordoauth2's People

Contributors

tawfiqsiam avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.