Lakehead University COMP-9800 Project Winter - Spring/Summer 2021
-
Authorized Javascript Origins: http://127.0.0.1:8000
-
Authorized Redirect URIs: http://127.0.0.1:8000/accounts/google/login/callback/
Note the Client ID and Client secret.
-
Install MySQL and create a database named “insurance”
-
Run the following commands
$ pip install -r required.txt $ python ./configure.py $ python manage.py makemigrations $ python manage.py migrate $ python manage.py createsuperuser $ python manage.py runserver
-
Go to http://127.0.0.1:8000/admin and login with the superuser credentials.
-
Update the domain and display name from example to "127.0.0.1:8000".
-
Go to Social Accounts/ Social applications and create a new record. For Provider select "Google", copy and paste the Google Client id and Secret key from GCP and choose example for sites.
- Run the following command
$ python manage.py runserver
- Go to http://127.0.0.1:8000/ in your browser.
Note: You must consistently use http://localhost:8000/ OR http://127.0.0.1:8000/ everywhere to match the URL pattern on GCP to make OAuth work.