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

token.json #55

Open
tobiasgrossmann opened this issue Mar 9, 2021 · 4 comments
Open

token.json #55

tobiasgrossmann opened this issue Mar 9, 2021 · 4 comments

Comments

@tobiasgrossmann
Copy link

Maybe a missing documentation part,
how to auto-update die token.json regular? The token comes with an expire date:
... "scope":"https://www.googleapis.com/auth/gmail.readonly","token_type":"Bearer","expiry_date":1614682765030}

So howto setup gmail-tester in an CI environment?

@hassanzohaib
Copy link

@tobiasgrossmann Have you found any solution for it?

@riccardogiorato
Copy link

Hey @tobiasgrossmann and @hassanzohaib I just found out a simple solution to integrate "gmail-tester" in a CI environment!

I described the complete solution here: #56 (comment)

In a few words:

  1. download "credentials.json" and "token.json" from S3 bucket
  2. execute the function "refresh_access_token"
  3. upload the updated token to the S3 bucket for the following CI runs!

I hope I was able to help you and if you need more help just let me know! If I helped you can star my repository here: https://github.com/riccardogiorato/cypress-for-everything

@MAfzalKhan1997
Copy link

MAfzalKhan1997 commented Dec 5, 2021

literally this sucks I've been facing this for so long.. any solution for this ? every time when I create new token.json it gives even the more shorter expiry.

also when I'm trying to execute the function "refresh_access_token" it is giving me "invalid grant" error for that too.

I'm using it with next js project.

@NEMETOM
Copy link

NEMETOM commented Jun 16, 2023

Hey @tobiasgrossmann and @hassanzohaib I just found out a simple solution to integrate "gmail-tester" in a CI environment!

I described the complete solution here: #56 (comment)

In a few words:

  1. download "credentials.json" and "token.json" from S3 bucket
  2. execute the function "refresh_access_token"
  3. upload the updated token to the S3 bucket for the following CI runs!

I hope I was able to help you and if you need more help just let me know! If I helped you can star my repository here: https://github.com/riccardogiorato/cypress-for-everything

Hi @riccardogiorato
Thanks for your response on this. One regarding token.json and credentials.json files. is there any chance to store values from these files in environment variables?
Or what would be your suggestions when it comes to security?

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

5 participants