Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arenaxr/arena-account
Django project user account management for the ARENA.
https://github.com/arenaxr/arena-account
Last synced: 3 months ago
JSON representation
Django project user account management for the ARENA.
- Host: GitHub
- URL: https://github.com/arenaxr/arena-account
- Owner: arenaxr
- License: bsd-3-clause
- Created: 2020-11-02T21:09:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-01T15:12:36.000Z (3 months ago)
- Last Synced: 2024-11-01T16:20:02.810Z (3 months ago)
- Language: Python
- Homepage: https://docs.arenaxr.org/content/architecture/security.html
- Size: 13.8 MB
- Stars: 1
- Watchers: 10
- Forks: 2
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# arena-account
Django project user account management for the ARENA.**Dependencies**: `python3`, `pip3`, `virtualenv` (and `requirements.txt`; check if path in `Makefile` is correct)
## Production Setup
1. Setup a [Google Cloud App](https://developers.google.com/identity/protocols/oauth2) for your instance of the ARENA.
2. Make sure to set up [Google Web OAuth](https://developers.google.com/identity/protocols/oauth2/web-server) for the ARENA web client as well as [Google Limited-Input OAuth](https://developers.google.com/identity/protocols/oauth2/limited-input-device) for the ARENA Python client.
3. For the Google Web OAuth Credentials you will need to add Authorized JavaScript origins:
```
http://your.domain
http://localhost:8989
```
4. For the Google Web OAuth Credentials you will need to add Authorized redirect URIs:
```
http://your.domain/user/accounts/google/login/callback/
http://localhost:8989/
```## Local Development Setup
1. For the Google Web OAuth Credentials you will need to add Authorized JavaScript origins:
```
http://localhost:8000
```
2. For the Google Web OAuth Credentials you will need to add Authorized redirect URIs:
```
http://localhost:8000/user/accounts/google/login/callback/
```
3. Create an environment file, `.env`, for testing on localhost using your Google auth app "Client id" and "Secret key".
```env
HOSTNAME=localhost
ARENA_REALM=realm
[email protected]
GAUTH_CLIENTID=Google_OAuth_Web_application_Client_ID
GAUTH_CLIENTSECRET=Google_OAuth_Web_application_Client_Secret
GAUTH_INSTALLED_CLIENTID=Google_OAuth_Desktop_Client_ID
GAUTH_INSTALLED_CLIENTSECRET=Google_OAuth_Desktop_Client_Secret
GAUTH_DEVICE_CLIENTID=Google_OAuth_TV_and_Limited_Input_Client_ID
GAUTH_DEVICE_CLIENTSECRET=Google_OAuth_TV_and_Limited_Input_Client_Secret
MQTT_TOKEN_PRIVKEY=/path/to/your/test/key/file.pem
```
4. Create db: ```make migrate```
5. Create admin user: ```python3 manage.py createsuperuser --email [email protected] --username admin```### Execute
- ```make run```### UIs
- Admin: `http://localhost:8000/user/admin`
- Main Page: `http://localhost:8000/user`