Connexion OAuth depuis site + Comptage rewards SQL

This commit is contained in:
Zachary Guénot
2023-05-09 00:32:43 +02:00
parent be73cd765d
commit 172f811e91
19 changed files with 712 additions and 123 deletions

10
utils/oauthGen.js Normal file
View File

@@ -0,0 +1,10 @@
module.exports = async function (client_id, redirect_uri, scope) {
console.log(scope)
let queries = {
response_type: 'code',
client_id,
redirect_uri,
scope: scope.join('+')
}
return `https://id.twitch.tv/oauth2/authorize?${Object.keys(queries).map(key=>`${key}=${queries[key]}`).join('&')}`
}