Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
chipchat-tokens-to-google-secretmanager-mixin
Advanced tools
You need to have basic understandings of the Google platform and have your service account file with sufficient rights to the project stored locally.
You need to have basic understandings of the Google platform and have your service account file with sufficient rights to the project stored locally.
Before you can use this, you have to set the _tokens in the store from the CLI (terminal) with:
#first we export some stuff to make the command more readable
export GOOGLE_APPLICATION_CREDENTIALS=/full/path/to/serviceaccountfile.json #Get access to your project
export TOKEN=<paste your access token here>
export REFRESHTOKEN=<paste your refresh token here>
export $GOOGLEPROJECT=<type the name of the project in google where you will create the secret and the service account has acces to>
export BOTID=<paste the bot id here>
#then create the secret holding the bots tokens:
echo -n '{"token":"'$TOKEN'", "refreshToken":"'$REFRESHTOKEN'"}' | gcloud secrets create $BOTID_tokens \
--data-file=- --replication-policy automatic --project $GOOGLEPROJECT
Now that you have got you tokens in the store, lets use them via the mixin module like this:
const ChipChat = require('chipchat');
const { getTokens, setTokens } = require('chipchat-tokens-to-google-secretmanager-mixin');
ChipChat.mixin({ getTokens, setTokens });
// The bots email is needed to request new tokens
// with the refreshToken and is also used to store the
// tokens in the google secrest store.
// The bots user id that is found in
// the properties panel of the bot (for the bot owner)
const email = `bot+${process.env.BOTID}@chatshipper.com`;
const bot = new ChipChat({ email }); // no need for tokens, email is enought
//alternatively you can use new ChipChat({ token, refreshToken })
const conversationid = process.env.CONVERSATION;
bot.conversations.get(conversationid).then(console.log);
FAQs
ChatShipper uses access tokens (token and refreshToken) to gain access to the api. You normally pass them when you initilialize the sdk like this: ```js const Sdk = require('chipchat'); const api = new Sdk({ token: 'your access token', refreshToken: 'your
The npm package chipchat-tokens-to-google-secretmanager-mixin receives a total of 30 weekly downloads. As such, chipchat-tokens-to-google-secretmanager-mixin popularity was classified as not popular.
We found that chipchat-tokens-to-google-secretmanager-mixin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.