This is the Flask application that uses Flask, SQLAlchemy, and rAuth to authenticate users for MyMLH and manage HackRU Spring 2016 registration for thousands of registrants on a real-time system.
It is currently not in use, so the MLH client and secret keys are invalid.
These are the steps to get the app up and running:
Create a new Virtual Environment for the project and source it. If you don't have Virtaul Environment yet, you can find installation instructions here.
$ virtualenv venv
$ source venv/bin/activate
Next we need to install the project dependencies, which are listed in requirements.txt
.
(venv) $ pip install -r requirements.txt
Head over to http://my.mlh.io/ and register a new application. You'll need to specify a callback url, which should be something like:
http://localhost:5000/callback/mlh
The default port for flask apps is 5000
, but you may need to update this if your setup uses a different port or if you're hosting your app somewhere besides your local machine.
Open up app.py with your favorite text editor and insert the MyMLH App ID and Secret you got once you setup your app.
app.config['OAUTH_CREDENTIALS'] = {
'mlh': {
'id': '[INSERT MyMLH APP ID]',
'secret': '[INSERT MyMLH SECRET]'
}
}
Now we're ready to start our server which is as simple as:
(venv) $ python app.py
This sample is built off of the Flask OAuth Example by Miguel Grinberg and retains his MIT License.