Panel terminé + Refresh token auto

This commit is contained in:
Zachary Guénot
2023-05-11 00:37:16 +02:00
parent de01c981f8
commit 8846299424
18 changed files with 251 additions and 64 deletions

View File

@@ -8,7 +8,7 @@ module.exports = async function (client_id, client_secret, code, redirect_uri) {
redirect_uri,
grant_type: 'authorization_code'
}).then(response => {
console.log(response.data)
if (response.data.token_type === 'bearer') return response.data.access_token
//console.log(response.data)
if (response.data.token_type === 'bearer') return [response.data.access_token, response.data.refresh_token]
}).catch(error => { console.log(error.response.data) })
}