PixelogicDev / gruveebackend

This is the Backend work for Gruvee
MIT License
24 stars 4 forks source link

🗂 Fixing Local And Cloud File Access Issues #44

Closed adilanchian closed 4 years ago

adilanchian commented 4 years ago

When deploying the Apple Auth functions, we ran into a lot of issues of accessing local files. I first started by storing them in a Storage Bucket in Firebase, but this seemed like a really improper way to do this. After a lot of research and deployments I was able to find the following:

https://cloud.google.com/functions/docs/concepts/exec#file_system

TL;DR - To access the readonly filesystem in our functions we need to access the serverless_function_source_code folder that puts all of the external files in.

With this information I was able to rework both AuthorizeWithApple & CreateAppleDevToken functions. This is a MUCH better solution.

Functions To Tag: cmd/appleauth -> v1.0.0-beta.3 cmd/createappledevtoken -> v1.0.0-beta.3