Skip to content

Commit

Permalink
chore(docs): update Cloudflare documentation
Browse files Browse the repository at this point in the history
Vite setup no longer required.
  • Loading branch information
dev-xo authored Oct 25, 2024
1 parent f38646d commit 5242aba
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions docs/cloudflare.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ export default {
}
```

### Vite

Enable [Node.js compatibility](https://developers.cloudflare.com/workers/runtime-apis/nodejs/) for Cloudflare in [wrangler.toml](https://developers.cloudflare.com/workers/runtime-apis/nodejs/#enable-nodejs-with-workers), [Cloudflare Dashboard](https://developers.cloudflare.com/workers/runtime-apis/nodejs/#enable-nodejs-from-the-cloudflare-dashboard), and in the start script inside `package.json`.

```json
"scripts": {
"start": "wrangler pages dev ./build/client --compatibility-flags=nodejs_compat"
}
```

Ensure the `Buffer` global is set up before using `remix-auth-totp`.

```ts
import { Buffer } from 'node:buffer'

function setUpGlobals() {
globalThis.Buffer = Buffer
}
```

### AppLoadContext

If you need `context` to be populated with the `AppLoadContext` in `SendTOTPOptions` or `TOTPVerifyParams`, be sure to include it in the call to `authenticate` on the remix-auth `Authenticator`.
Expand Down

0 comments on commit 5242aba

Please sign in to comment.