A simple web server that powers OAuth2 functionality of Spirit.
This is not a standalone application. It is designed to be used in tandem with Spirit, a Discord bot for Destiny 2.
- Python 3.5+
- Pip
- Redis server
- Bungie.net app
Redis can be installed with:
$ sudo apt-get install redis-server
To verify that it has been installed correctly, type:
$ redis-server
Note that if you already have a Bungie.net application in use by Spirit, you don't need to create another one.
- Navigate to https://www.bungie.net/en/Application
- Sign in and create a new app
- Set OAuth Client Type to Confidential
- Set Redirect URL to https://127.0.0.1:5000/oauth
- Under Scope, select all except the permission to move gear and items
First, install the required Python libraries
$ sudo pip3 install -r requirements.txt
Next, create a credentials.json
file in the root directory of this project. It will contain your
Bungie application's client id and secret.
{
"client_id": "your-client-id",
"client_secret": "your-client-secret"
}
Then the server can be run with:
$ python3 server.py
By default, the server will run at http://127.0.0.1:5000
Note: Keep in mind that Bungie will redirect to this web server with HTTPS. However, this app is only setup for HTTP by default, so you'll need to change the link in your browser from HTTPS to HTTP in order for the authorization to work.