How to dynamically set the cookie secrets value
In the https://github.com/jose-donato/race-stack/blob/main/app/lib/cookie.server.ts the secret value has the following comment
secrets: ["replace_me"], // replace this with an actual secret
Given that this is meant for cloudflare stack how do you get the environment variable secret into this cookie? I might be missing something. Since the environment variables come from action context.
Thanks for putting this together.
In the
https://github.com/jose-donato/race-stack/blob/main/app/lib/cookie.server.tsthe secret value has the following commentsecrets: ["replace_me"], // replace this with an actual secretGiven that this is meant for cloudflare stack how do you get the environment variable secret into this cookie? I might be missing something. Since the environment variables come from action context.
Thanks for putting this together.
hey sorry for the delay.
that's a good question. when I first did this I didn't find a good solution either.
https://developers.cloudflare.com/workers/configuration/secrets/
I would search something in this documentation page. let me know if you find any good solution! 😄
I'm trying to use an approach similar to remix-auth-totp
which can be found here:
- https://github.com/mw10013/remix-auth-totp-cloudflare-example/blob/main/app/lib/services.server.ts
and here is how they use it:
- https://github.com/mw10013/remix-auth-totp-cloudflare-example/blob/main/app/routes/account.tsx
I'm trying to use an approach similar to
remix-auth-totpwhich can be found here:
* [mw10013/remix-auth-totp-cloudflare-example@`main`/app/lib/services.server.ts](https://github.com/mw10013/remix-auth-totp-cloudflare-example/blob/main/app/lib/services.server.ts)and here is how they use it:
* [mw10013/remix-auth-totp-cloudflare-example@`main`/app/routes/account.tsx](https://github.com/mw10013/remix-auth-totp-cloudflare-example/blob/main/app/routes/account.tsx)
thanks for sharing!