Git Product home page Git Product logo

open-dccon-selector's People

Contributors

dependabot[bot] avatar rishubil avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

open-dccon-selector's Issues

올바르지 못한 JWT 사용

채널 정보를 업데이트할 때 사용하는 required_configuration 관련 API에서, JWT에 사용되는 User ID는 스트리머의 ID가 아닌 익스텐션 소유자의 ID입니다.

def put(self, user_id):
def twitch_rc_dccon(dccon_url):
if dccon_url:
update_twitch_rc(decoded_token, ['dcconUrl'])
else:
update_twitch_rc(decoded_token, [])
parser = reqparse.RequestParser()
parser.add_argument('token', type=str, required=True)
parser.add_argument('dccon_url', type=str, required=False)
parser.add_argument('dccon_type', type=str, required=False)
parser.add_argument('is_using_cache', type=int, required=False)
args = parser.parse_args()
token = args['token']
dccon_url = args['dccon_url'] if 'dccon_url' in args else None
dccon_type = args['dccon_type'] if 'dccon_type' in args else None
is_using_cache = parse_bool(args['is_using_cache']) if 'is_using_cache' in args else None
if dccon_type not in Channel.DCCON_TYPES:
abort(400, '{dccon_type} is invalid dccon_type'.format(dccon_type=dccon_type))
decoded_token = decode_twitch_token(token)
broadcaster_user_id = verify_broadcaster(decoded_token)
if user_id != broadcaster_user_id:
abort(400, 'Mismatched user_id')
channel = get_channel_by_user_id(user_id)
old_dccon_url = channel.dccon_url
if dccon_url is not None:
channel.dccon_url = dccon_url
twitch_rc_dccon(dccon_url)
if dccon_type is not None:
channel.dccon_type = dccon_type
if is_using_cache is not None:
channel.is_using_cache = is_using_cache
update_db(cb_rollback=lambda: twitch_rc_dccon(old_dccon_url))
return channel.json(), 200

아래 문서를 참조하여 수정해야 합니다

https://dev.twitch.tv/docs/extensions/building/#signing-the-jwt

Config 페이지 UI 개선

초기 설정이 너무 불친절함
대부분의 설정은 별도의 설명 없이 선택할 수 있도록 하고,
스트리머의 디시콘 URL을 어디서 확인할 수 있는지 가이드가 필요함

백엔드 재구축

개인 서버만으로 운영하기는 조금 부담스러움(Downtime이 언제든지 발생할 수 있음)

따라서 로드밸런서를 하나 두고, 평소에는 개인 서버에서 운용하다가 문제 발생시에 다른 서버에서 서비스를 제공했으면 좋겠음.

AWS나 Azure, Google Cloud 등을 최소 가격으로 운용할 수 있는 방안을 찾아볼 예정.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.