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

token.json

Open tobiasgrossmann opened this issue 3 years ago • 4 comments

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?

tobiasgrossmann avatar Mar 09 '21 16:03 tobiasgrossmann

@tobiasgrossmann Have you found any solution for it?

hassanzohaib avatar Aug 18 '21 10:08 hassanzohaib

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: https://github.com/levz0r/gmail-tester/issues/56#issuecomment-907758544

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

riccardogiorato avatar Aug 29 '21 09:08 riccardogiorato

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.

MAfzalKhan1997 avatar Dec 05 '21 21:12 MAfzalKhan1997

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?

NEMETOM avatar Jun 16 '23 09:06 NEMETOM