Authentication Using Firebase Admin SDK for PHP
denusklo opened this issue · 7 comments
After deployment on vercel and tried to login to my apps, it shows the below message:
The token is invalid: file_put_contents(/var/task/user/storage/framework/cache/data/24/fc/24fc69d48eaa682f929a7045e8f4700237c0083e): Failed to open stream: No such file or directory
Is this because of the php runtime trying to write files on vercel but it has no permission or what?
Yes. You have to use /tmp
for cache or logs.
Using ENV is great way. Is it working correctly?
the session and cache path I set.
but got this error
to solve this error I have tried to set build scripts
at package.json
to
- make new folder `tmp/sessions
- set the permission
- and list all file at
/tmp
folder (below is the vercel build log)
Which step did I did wrong, is it the path for sessions is set wrong?
There is only /tmp
path. If you need deeper structure, you have to create somehow. For example /tmp/sessions
, because php will not create /tmp/sessions
itself.