zsmooth
BABetter Auth
•Created by luksch42 on 3/5/2025 in #help
Sign in with Apple in web fails / error: 'invalid_client'
Yeah you’d have to save it somewhere. I’m on Cloudflare and save it in Workers KV. Doesn’t Vercel have something similar?
16 replies
CDCloudflare Developers
•Created by zsmooth on 4/6/2025 in #wrangler
i reran npx wrangler types to generate a
It actually would be nice if they could publish a version of workers-types that’s empty, so we could pin to that version with npm overrides, to get around the issue of it getting installed as a peer dep
4 replies
CDCloudflare Developers
•Created by zsmooth on 4/6/2025 in #wrangler
i reran npx wrangler types to generate a
I tracked this down to
@cloudflare/workers-types
being installed as a peer dep, and the Cloudflare.Env
referencing the empty one in that. I found a workaround by adding import "./worker-configuration.d.ts"
at the top of the root file using the Env
and it fixed the resolution.4 replies
BABetter Auth
•Created by luksch42 on 3/5/2025 in #help
Sign in with Apple in web fails / error: 'invalid_client'
i'm generating the client_secret on the server and caching it, and then automatically regenerating it every time it's a day away from expiring. i don't get the examples i see where people are generating the secret on the command line. makes no sense to me
16 replies
CDCloudflare Developers
•Created by svend on 1/10/2025 in #workers-help
Workers with static assets - asset caching?
Where is this documented?
22 replies
CDCloudflare Developers
•Created by zsmooth on 3/18/2025 in #wrangler
that wasn't it... it turns out that the
But when I push a secret, it reads the config, right? It has to to at least get the name of the worker. My worry was that it would read the redirected config, see that the env you specified doesn’t exist, and fail. But according to Pete it sounds like that’s not the case
15 replies
CDCloudflare Developers
•Created by zsmooth on 3/18/2025 in #wrangler
that wasn't it... it turns out that the
(If you’re saying i have to run a build before pushing a secret, which is what it sounds like)
15 replies
CDCloudflare Developers
•Created by zsmooth on 3/18/2025 in #wrangler
that wasn't it... it turns out that the
Yeah, that’s a terrible DX. Will need lots of clear docs and messaging
15 replies
CDCloudflare Developers
•Created by zsmooth on 3/18/2025 in #wrangler
that wasn't it... it turns out that the
One improvement to the DX here might be if someone uses
--env
and that env doesn't exist in the redirected config, but it DOES exist in the local config, tell them what happened: "A redirected wrangler.json was built by your build process. You may need to specify CLOUDFLARE_ENV in order for the generated file to have the correct env."
This could have been really bad if I had my production deploy instructions as the default (non-named env), and was trying to deploy to env.staging. It would have deployed to production without me realizing it. The only reason it was failing for me was because I have a KV binding with the id
set to dev
for the dev environment, and that obviously won't work with a deployed binding. I could see this biting someone in the future:
* They use a template to set up a basic wrangler worker app that deploys to an environment without --env
.
* They build up that environment and it's like a playground
* Eventually they decide it's good enough and it's prod
* They realize they need a staging env, and add it to the wrangler.json
Now they're in a situation where accidentally deploying to prod when they wanted to deploy to staging could happen because of the redirected wrangler.json.15 replies
CDCloudflare Developers
•Created by zsmooth on 3/18/2025 in #wrangler
that wasn't it... it turns out that the
Does the redirected config only apply to the deploy command? And if not, does that mean i have to run a build before (for example) uploading a new secret?
15 replies
BABetter Auth
•Created by luksch42 on 3/5/2025 in #help
Sign in with Apple in web fails / error: 'invalid_client'
Adding it to trustedDomains worked for me. I think this is a better auth bug, not an apple bug
16 replies
BABetter Auth
•Created by luksch42 on 3/5/2025 in #help
Sign in with Apple in web fails / error: 'invalid_client'
Did you ever track this down? I'm getting the same error.
16 replies