gmail-tester icon indicating copy to clipboard operation
gmail-tester copied to clipboard

Object instead of string

Open JelenaDimitrijevic986 opened this issue 2 years ago • 3 comments

Since those credential files can't be included on CI, can parameters for checkInbox(), instead of string(file path) be object with secret properties?

JelenaDimitrijevic986 avatar Oct 29 '21 07:10 JelenaDimitrijevic986

Can you please elaborate what kind of object is it?

levz0r avatar Nov 22 '21 21:11 levz0r

All the properties that needed as secrets for CI { "client_id": "", "project_id": "", "auth_uri": "", "token_uri": "", "client_secret": "", "access_token": "" }

Because those secrets need to be in .gitignore, and when including path and run tests on some CI tool it complaints on missing file const email = await gmail.check_inbox( path.resolve(__dirname, 'credentials.json'), path.resolve(__dirname, 'gmail_token.json'), {include_body: true}, from, to, subject, before, after );

JelenaDimitrijevic986 avatar Nov 23 '21 09:11 JelenaDimitrijevic986

This would be huge for me. I'm having to write the credentials to a file temporarily just to read them for this package instead of just passing a string.

I believe most of this work is done here https://github.com/levz0r/gmail-tester/pull/52

athammer avatar Nov 25 '21 02:11 athammer