Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rabahs/tvos-oauth-server
tvOS OAuth is Remote oauth2 service (using activation code) for tvOS (tested with Amazon Login, Dropbox)
https://github.com/rabahs/tvos-oauth-server
amazon amazon-api authentication dropbox dropbox-api ios oauth2 secret tvos
Last synced: about 1 month ago
JSON representation
tvOS OAuth is Remote oauth2 service (using activation code) for tvOS (tested with Amazon Login, Dropbox)
- Host: GitHub
- URL: https://github.com/rabahs/tvos-oauth-server
- Owner: rabahs
- Created: 2017-03-20T20:12:59.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-22T04:18:50.000Z (almost 8 years ago)
- Last Synced: 2024-08-07T23:57:21.612Z (5 months ago)
- Topics: amazon, amazon-api, authentication, dropbox, dropbox-api, ios, oauth2, secret, tvos
- Language: Python
- Homepage:
- Size: 122 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Remote Authenticator Service for tvOS
Enable users of your tvOS app to authenticate with Amazon (or potentially other oauth services) using an activation code on a mobile or desktop browser.
Comes with docker-compose to easily deploy to any Docker hosting service (e.g AWS or Digital Ocean)
Also check [tvOS client](https://github.com/rabahs/tvos-oauth)
![Diagram](tvos_authenticator.png)
## Production deployment- Setup docker host with docker-machine
```
# provision a docker machine on Digital Ocean or AWS
# https://www.digitalocean.com/community/tutorials/how-to-provision-and-manage-remote-docker-hosts-with-docker-machine-on-ubuntu-16-04
# example:
docker-machine create --driver digitalocean --digitalocean-access-token $DOTOKEN tvosauth
# or AWS
docker-machine create --amazonec2-region us-west-2 --amazonec2-vpc-id vpc-1a745a7f --driver amazonec2 tvosauth
# Verify docker machine is running
docker-machine ls
# Point docker client to the new docker machine
docker-machine env tvosauth
eval $(docker-machine env tvosauth)
```- Set env variables
- Rename .env_example to .env and update your production credentials and settings there
- AWS_CLIENT_ID: Your Amazon app client id
- AWS_CLIENT_SECRET: your Amazon app client secret
- SECRET_KEY: Your own random generated secret key (can use http://www.miniwebtool.com/django-secret-key-generator/)
- PUBLIC_URL: The public url for your authentication url (e.g. "auth.indiekit.com" )- Set SSL certificate for https access
- Create a folder named .ssl under /nginx directory
- Copy your SSL certificate file (SSL.crt) and certificate key (server.key) files there (use the exact file names)- Run all docker containers
```
docker-compose up -d
```- Run database migrations
```
docker-compose run --no-deps --rm web python migrate.py db upgrade
```- Generate api key and secret for your client app (make sure to copy the key and secret after your run the command)
```
docker-compose run --no-deps --rm web python manage.py create_app --name "TVOSOAUTH"```
- You can now use the $PUBLIC_URL/activate with the generated api key and secret in your tvOS app for authentication
## For dev environment setup
- Check [development section](/web/README.md)