Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object instead of string #71

Open
JelenaDimitrijevic986 opened this issue Oct 29, 2021 · 3 comments
Open

Object instead of string #71

JelenaDimitrijevic986 opened this issue Oct 29, 2021 · 3 comments

Comments

@JelenaDimitrijevic986
Copy link

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

@levz0r
Copy link
Owner

levz0r commented Nov 22, 2021

Can you please elaborate what kind of object is it?

@JelenaDimitrijevic986
Copy link
Author

JelenaDimitrijevic986 commented Nov 23, 2021

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
);

@athammer
Copy link

athammer commented Nov 25, 2021

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
#52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants