singingwolfboy / flask-dance

Doing the OAuth dance with style using Flask, requests, and oauthlib.
https://pypi.python.org/pypi/Flask-Dance/
MIT License
1k stars 157 forks source link

Twitch - MissingTokenError #395

Closed Zenahr closed 2 years ago

Zenahr commented 2 years ago

Related to https://github.com/singingwolfboy/flask-dance/issues/123

I've tried out the configuration proposed in https://github.com/singingwolfboy/flask-dance/issues/123#issuecomment-691333196


twitch_bp = OAuth2ConsumerBlueprint(
        "twitch",
        __name__,
        client_id=client_id,
        client_secret=client_secret,
        scope=scope,
        base_url="https://api.twitch.tv/helix/",
        authorization_url="https://id.twitch.tv/oauth2/authorize",
        token_url="https://id.twitch.tv/oauth2/token",
        redirect_url=redirect_url,
        redirect_to=redirect_to,
        login_url=login_url,
        authorized_url=authorized_url,
        session_class=session_class,
        storage=storage,
        token_url_params={"include_client_id": True}
    )

Add that token_url_params. I also changed the base_url, don't think that matters.

Originally posted by @vincentjr in https://github.com/singingwolfboy/flask-dance/issues/123#issuecomment-691333196


The MissingTokenError persists.

Zenahr commented 2 years ago

Solved by generating a new client secret in the Twitch dashboard. If you experience this error I highly suggest trying that out as it seems like Twitch has problems storing new configurations.