nestjs-hybrid-auth
nestjs-hybrid-auth copied to clipboard
[Twitch] no way to pass state from request
there is currently no way (or at least documentation) to pass the state via @UseTwitchAuth() using the request query params
@dafreaki What exactly your use case is?
being able to pass the state of the request i.e a nonce or the referring url basically something that the callback can consume please see https://dev.twitch.tv/docs/authentication/getting-tokens-oauth
Parameter | Required? | Type | Description |
---|---|---|---|
client_id | Yes | String | Your app’s registered client ID. |
force_verify | No | Boolean | Set to true to force the user to re-authorize your app’s access to their resources. The default is false. |
redirect_uri | Yes | URI | Your app’s registered redirect URI. The authorization code is sent to this URI. |
response_type | Yes | String | Must be set to code. |
scope | Yes | String | A space-delimited list of scopes. The APIs that you’re calling will identify the scopes you must list. You must URL encode the list. |
state | No | String | Although optional, you are strongly encouraged to pass a state string to help prevent Cross-Site Request Forgery (CSRF) attacks. The server returns this string to you in your redirect URI (see the state parameter in the fragment portion of the URI). If this string doesn’t match the state string that you passed, ignore the response. The state string should be randomly generated and unique for each OAuth request. |