Trying to find a way to add tokens to this Account...
# sdf
a
Trying to find a way to add tokens to this Account Management without having to manually enter the tokens one by one.
a
The credentials are saved in users home/. Suitecloud-sdk/credentials file. I am afraid the encryption will not allow you to manipulate the file manually and you will have to save tokens or issue tokens which are later available for all projects and in javacli and nodecli also.
a
Are you guys considering adding an option or enhancement to the Plugin? Real case scenario: • NetSuite Partners usually have multiple developers working in multiple NetSuite instances, this creates the issue of generating multiple token per NetSuite instance by different developers which eventually reach the point of: Too Many Active Tokens for a given or multiple accounts. If the plugin have an option where you can specify a centralized location/repo and it download and replace/update the credentials file then that would solve the problem and you can have 5 developers using 20 different NetSuite accounts with only one credential file which means 1 Token per NetSuite instance.
a
The token is associated with an account. So i dont think officially we will provide a way to share credentials file. But you can choose something for your team which works for you. If you want to share credentials file. Or provide tokenid and tokensecret to multiple developers. 1 generated token from UI can be saved in multiple tools unless it is revoked.
p
Ali has a point regarding tokens and accounts however if you want to achieve this why not just write a bash or node script that uses the account:ci command?
’/* Non tested and likely non functioning example for Node which I take no responsibility over below */ const exec = require(‘exec’) // THESE SHOULD OBVIOUSLY NOT BE STORED DIRECTLY IN THE FILE const secrets = [ {account: 123, authid: ‘sandbox’, tokenId: 12312312, tokenSecret: 1123123}, {account: 321, authid: ‘prod’, tokenId: 3213213213, tokenSecret: 1123123} ] function readSecrets() { // HERE I COULD INSTEAD READ A FILE return secrets } const secretsToADD = readSecrets() secretsToADD.map(secret => { exec(
suitecloud account:ci --account ${secret.account} --authid ${secret.authid} --tokenid ${token.tokenId} --tokensecret ${token.tokenSecret} --savetoken
) })
Obviously secrets should not be in the file and preferably gitignored and stored safely