Achrou / goindex-theme-acrou

This is a goindex theme.一个goindex的扩展主题。
https://ossdev.node6.workers.dev/
MIT License
1.62k stars 874 forks source link

Please Added multiple Client ID, Client Secret, and Refresh Token #218

Open rikyuking opened 3 years ago

rikyuking commented 3 years ago

iam request for add multiple Client ID, Client Secret, and Refresh Token in index.js

example :

Account 1 client_id: "202264815644.apps.googleusercontent.com", client_secret: "X4Z3ca8xfWDb1Voo-F9a7ZxJ", refresh_token: "", // 授权 token

Account 2 client_id: "202264815644.apps.googleusercontent.com", client_secret: "X4Z3ca8xfWDb1Voo-F9a7ZxJ", refresh_token: "", // 授权 token

..... .....

Account 10 client_id: "202264815644.apps.googleusercontent.com", client_secret: "X4Z3ca8xfWDb1Voo-F9a7ZxJ", refresh_token: "", // 授权 token

i think this is solution for gdrive limit so if account 1 limit, automatically change to account 2

thanks regard

MythodeaLoL commented 2 years ago

have a pull request with this updade @rikyuking , from the other code gdindex, um can get the code/array to use random service accounts, multiples, on onde index.

const serviceaccounts = [
{
    "type": "service_account",
    ...
    "client_x509_cert_url":...
},
{
    "type": "service_account",
    ...
    "client_x509_cert_url":...
},
... many as need
];
const randomserviceaccount = serviceaccounts[Math.floor(Math.random()*serviceaccounts.length)];
...

client_id: "",, #important keep empty for service accounts
client_secret: "", #important keep empty for service accounts
refresh_token: "",, #important keep empty for service accounts
service_account: true,
service_account_json: randomserviceaccount,

remeber, u need to use the pull request with the js updated to use this modifications. using multiples service accounts, like u need.