View Source mix twitch.auth (hello_twitch_api v0.5.3)
A task for getting an OAuth access token from Twitch, using the authorization code flow.
NOTE: To use this, you need to add the local listener to your app's redirect urls:
http://localhost:42069/oauth/callbackWhere 42069 is the default --listen-port value. Change the port to match any
value you use for this if you specify it yourself.
Usage
mix twitch.auth [OPTION]Options
--output- Specify how we want to output the token. Valid values are:json,priv,.env,.envrc,stdout,clipboard. NOTE: Onlypriv,json, andstdoutare supported currently.--name- The name of the auth_store to use. Defaults toTwitchAPI.AuthStoreif not set.--listen-port- The port that the temporary web server will listen on. Defaults to42069if not set.--listen-timeout- The time in ms that the server waits for a the twitch redirect with the authorization code. Defaults to300_000if not set.
Auth Options
--client-id- The Twitch client ID for your app. Defaults to the value of theTWITCH_CLIENT_IDenv var if not set.--client-secret- The Twitch client secret for your app. Defaults to the value of theTWITCH_CLIENT_SECRETenv var if not set.--auth-scope- The Twitch auth scope for your app. A space-separated string. Defaults to the value of theTWITCH_AUTH_SCOPEenv var if not set. If the env var is not set, it defaults to thedefault_scopelist, which should be allreadscopes except forwhisperandstream_key.
ENV Vars
TWITCH_CLIENT_ID- The Twitch client ID for your app.TWITCH_CLIENT_SECRET- The Twitch client secret for your app.TWITCH_AUTH_SCOPE- The Twitch scopes as a space-separated string.