bliko
Google credentials.json & token.json in environment variables? Or in render? Or where?
Hey everyone, I'm a front end developer and I'm dipping my toes into .NET helping out in an internal tool for my company. Right now the App is based on React/Vite/TS and the back is .NET 8. I'm currently working on a Proof of Concept inside of the internal App that consist of:
Gmail Service / Gmail Controller:
The user logins, and gets an array of their unread emails (Then I process it someway and they get it displayed in the internal tool in a notifications badge.)
The issue that I'm facing is that in order to use the Gmail API I created a credentials.json to work locally, and when validating in the service it creates a token.json. My question is what should I do with the credentials.json? I thought of using it as an env variable but I can't straight up put a JSON object, and the option that I'm left with is like stringifying the json, and then deserialize and build like a JSON on the service which is a complete mess...I'm kinda lost and I haven't found much information.of which is the best way. The project is hosted on render, I thought of maybe puting the credentials.json in there somehow? (I don't have access to Render, it's managed by the TL.)
8 replies