makebrainwaves / BrainWaves

An easy-to-use platform for EEG experimentation in the classroom
MIT License
62 stars 26 forks source link

Emotiv keys included with the ci build? #141

Closed teonbrooks closed 3 years ago

teonbrooks commented 4 years ago

@jdpigeon, just curious, are we including the Emotiv keys with the CI builds of the app?

jdpigeon commented 4 years ago

Good catch! No, they will not be included at this point because they're stored in local machine environment variables. We'll have to look into how to store those keys in CI somehow without them being leakable.

teonbrooks commented 4 years ago

looks like github supports adding secrets and that secrets object can be passed to the ci. i reformatted our keys.js to be json. I will see if i can mod the github action to accept them. do we specify a .env for node anywhere? it looks as if we could update it to expect process.env.keys

jdpigeon commented 4 years ago

Yea, I think all we have to do is write some CI code that will load the secrets into these environment variables

const USERNAME = process.env.EMOTIV_USERNAME;
const PASSWORD = process.env.EMOTIV_PASSWORD;
const CLIENT_ID = process.env.EMOTIV_CLIENT_ID; // Created through Cortex Apps page on Emotiv.com
const CLIENT_SECRET = process.env.EMOTIV_CLIENT_SECRET; // Created through Cortex Apps page on Emotiv.com
const LICENSE_ID = process.env.EMOTIV_LICENSE_ID;
teonbrooks commented 3 years ago

completed