Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
bbb8532
feat: added r2 image upload
victoriaplummer Aug 11, 2025
e98fbe2
readded bindings
victoriaplummer Aug 11, 2025
3c19bf3
chore: updated api paths to use the base path
victoriaplummer Aug 11, 2025
b37c0a2
updated base path for default avatar
victoriaplummer Aug 11, 2025
53d05d2
chore: switched to assets prefix
victoriaplummer Aug 11, 2025
2125e4f
docs: tried fixing base path
victoriaplummer Aug 11, 2025
3e8e29b
chore: removed csrf protectiosn
victoriaplummer Aug 11, 2025
1719e63
chore: fixed base paths
victoriaplummer Aug 11, 2025
3d89f48
chore : trying to fix cors
victoriaplummer Aug 11, 2025
fd46142
chore: trying to fix memory upload issue
victoriaplummer Aug 11, 2025
a76e7f3
chore: fix size limit issues
victoriaplummer Aug 11, 2025
a760b8b
chore: trying binary
victoriaplummer Aug 11, 2025
42b8284
trying stream again
victoriaplummer Aug 11, 2025
ab673cc
chore: trying to fix uploads
victoriaplummer Aug 12, 2025
2f8853b
chore: updating upload strategy
victoriaplummer Aug 12, 2025
581761a
feat: added profile to nextjs example
victoriaplummer Aug 12, 2025
630bf8a
changed basepath
victoriaplummer Aug 12, 2025
c686827
chore: fixed syntax errors
victoriaplummer Aug 12, 2025
feccdc6
fixed issues
victoriaplummer Aug 12, 2025
e258bfb
updated to use assets prefix
victoriaplummer Aug 13, 2025
efe001f
fixed auth
victoriaplummer Aug 13, 2025
7599f0f
chore: fixed paths
victoriaplummer Aug 13, 2025
36c2327
chore: fixed next build
victoriaplummer Aug 13, 2025
ad02086
trying to fix asset path stuff
victoriaplummer Aug 13, 2025
38f2a85
changed to base path
victoriaplummer Aug 13, 2025
d4aba0f
trying yet again
victoriaplummer Aug 13, 2025
c313168
trying a different approach
victoriaplummer Aug 13, 2025
32d93a4
chore: fix asset url in api call
victoriaplummer Aug 13, 2025
c8786fc
fixed avatar upload url
victoriaplummer Aug 13, 2025
cefb01b
chore: udpated cores
victoriaplummer Aug 13, 2025
1cf7c84
removed base path from origin check
victoriaplummer Aug 13, 2025
ea5adb0
trying again on cors
victoriaplummer Aug 13, 2025
b6c06c9
added includes headers
victoriaplummer Aug 13, 2025
125cde1
trying presigned url
victoriaplummer Aug 13, 2025
0cd00b0
fix path for upload
victoriaplummer Aug 13, 2025
a09148d
use base url
victoriaplummer Aug 13, 2025
9b19f1c
updated date
victoriaplummer Aug 13, 2025
7fc392b
fixed routing
victoriaplummer Aug 13, 2025
021240e
fixed avatar url
victoriaplummer Aug 13, 2025
ccffbec
made cors origin dynamic
victoriaplummer Aug 13, 2025
084ab6d
docs: fixed cors issue
victoriaplummer Aug 13, 2025
4511186
adding logging to the CORS headers
victoriaplummer Aug 13, 2025
d0ef1fa
small change
zplata Aug 14, 2025
695860e
commit
zplata Aug 14, 2025
1489355
test file uploads
victoriaplummer Aug 14, 2025
5399cb1
more changes
victoriaplummer Aug 14, 2025
91908a6
chore: fixed mount path
victoriaplummer Aug 14, 2025
dd1705c
chore: added progress bar
victoriaplummer Aug 14, 2025
64d9fa9
switched to streaming for larger files
victoriaplummer Aug 14, 2025
bd00248
chore: added multipart uploading
victoriaplummer Aug 14, 2025
8be44c1
multip-part upload correctly
victoriaplummer Aug 14, 2025
0619617
added include
victoriaplummer Aug 14, 2025
a3a88fc
return token on get-part-url
victoriaplummer Aug 14, 2025
e96c2cc
replaced custom uploader with uppy
victoriaplummer Aug 14, 2025
9e29a61
multipart upload
victoriaplummer Aug 14, 2025
afac7a6
removed second progress bar
victoriaplummer Aug 15, 2025
1e632c5
fixed cors
victoriaplummer Aug 15, 2025
b076203
fixing auth error
victoriaplummer Aug 15, 2025
d80a8ba
fixed upload
victoriaplummer Aug 15, 2025
d613984
trying to avoid webflow proxy
victoriaplummer Aug 15, 2025
68365ae
uploader
victoriaplummer Aug 15, 2025
a6509f6
trying to fix batching
victoriaplummer Aug 15, 2025
8b77816
added streaming
victoriaplummer Aug 15, 2025
d6dc780
Added progress tracking
victoriaplummer Aug 15, 2025
f79e230
Daisy ui
victoriaplummer Aug 15, 2025
6ce4260
tweak readme
zplata Sep 16, 2025
b458f33
clean up debugs
zplata Sep 19, 2025
e9699ff
Fix top-level README
zplata Sep 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Webflow Cloud Authentication Webapp
# Auth Cloud Webapp

This project encompasses examples showcasing how to set up an authentication solution with [Webflow Cloud](https://webflow.com/cloud). Dig into the individual folders to see more details in their respective READMEs on how to set the examples up locally and deploy them as a Webflow Cloud app for your site:
This project encompasses examples showcasing how to set up an authentication solution with [Webflow Cloud](https://webflow.com/cloud) and various storage solutions. Dig into the individual folders to see more details in their respective READMEs on how to set the examples up locally and deploy them as a Webflow Cloud app for your site:

- [BetterAuth (Email/Pass) for Astro](/betterauth-astro/)
- [BetterAuth (Email/Pass) for Next.js](/betterauth-nextjs/)

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Test thoroughly
5. Submit a pull request

## License

This project is licensed under the MIT License.
4 changes: 0 additions & 4 deletions betterauth-astro/.dev.vars.template

This file was deleted.

5 changes: 3 additions & 2 deletions betterauth-astro/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# automatically generated at 2025-07-08T22:30:34.346Z
WEBFLOW_SITE_ID=YOUR_SITE_ID
WEBFLOW_SITE_API_TOKEN=YOUR_TOKEN
WEBFLOW_SITE_ID=
BETTER_AUTH_SECRET=
BETTER_AUTH_URL=http://localhost:8787
15 changes: 15 additions & 0 deletions betterauth-astro/.vscode/css_custom_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": 1.1,
"atDirectives": [
{
"name": "@plugin",
"description": "Tailwind CSS v4 plugin directive",
"references": [
{
"name": "Tailwind CSS v4 Documentation",
"url": "https://tailwindcss.com/docs/installation"
}
]
}
]
}
12 changes: 8 additions & 4 deletions betterauth-astro/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"files.associations": {
"wrangler.json": "jsonc"
}
}
"files.associations": {
"wrangler.json": "jsonc"
},
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"css.customData": [".vscode/css_custom_data.json"]
}
18 changes: 5 additions & 13 deletions betterauth-astro/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@ npm install
```

```bash
npm run dev
npm run preview
```

The development server will start and automatically show you where to navigate:
The local server will start and automatically show you where to navigate:

```
🚀 Starting development server...
📍 App will be available at: http://localhost:4321/app
Starting local server...
[wrangler:info] Ready on http://localhost:8787/app
```

Open [http://localhost:4321/app](http://localhost:4321/app) in your browser to see the authentication app. You can:
Open [http://localhost:8787/app](http://localhost:8787/app) in your browser to see the authentication app. You can:

- Sign up for a new account at `/app/signup`
- Log in with existing credentials at `/app/login`
Expand Down Expand Up @@ -133,14 +133,6 @@ At this point, you should be able to test out the sign up/login flow as you did

If you make additional changes to your project, simply push them up to your repo on `main`, and Webflow will automatically kick off a new deployment with your changes. Also, if your deployment build fails for any reason, check the "Deployment History" for more logs.

## Build Locally

To check a build locally before Webflow kicks off a build and deploys the latest changes, simply run the following commands:

```bash
npm run preview
```

## Schema Changes

If you modify the database schema:
Expand Down
10 changes: 9 additions & 1 deletion betterauth-astro/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@ import { defineConfig } from "astro/config";

import cloudflare from "@astrojs/cloudflare";
import react from "@astrojs/react";
import tailwindcss from "@tailwindcss/vite";

// https://astro.build/config
export default defineConfig({
base: "/app",
base: "/files",
build: {
assetsPrefix: "/files",
},
output: "server",
security: {
checkOrigin: false,
},
adapter: cloudflare({
platformProxy: {
enabled: true,
},
}),
integrations: [react()],
vite: {
plugins: [tailwindcss()],
resolve: {
// Use react-dom/server.edge instead of react-dom/server.browser for React 19.
// Without this, MessageChannel from node:worker_threads needs to be polyfilled.
Expand Down
10 changes: 5 additions & 5 deletions betterauth-astro/cloudflare-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-disable */
// Generated by Wrangler by running `wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts` (hash: 6d5c961e233ab43ca4c2230e4430c16c)
// Generated by Wrangler by running `wrangler types --env-interface CloudflareEnv cloudflare-env.d.ts` (hash: e97a774ec183271f70ea23b11b8a8615)
// Runtime types generated with [email protected] 2025-04-15 nodejs_compat
declare namespace Cloudflare {
interface Env {
WEBFLOW_SITE_ID: string;
WEBFLOW_SITE_API_TOKEN: string;
BETTER_AUTH_SECRET: string;
BETTER_AUTH_URL: string;
PRODUCTION_ORIGIN_URL: string;
WEBFLOW_SITE_ID: string;
WEBFLOW_SITE_API_TOKEN: string;
USER_AVATARS: R2Bucket;
DB: D1Database;
ASSETS: Fetcher;
}
Expand All @@ -17,7 +17,7 @@ type StringifyValues<EnvType extends Record<string, unknown>> = {
[Binding in keyof EnvType]: EnvType[Binding] extends string ? EnvType[Binding] : string;
};
declare namespace NodeJS {
interface ProcessEnv extends StringifyValues<Pick<Cloudflare.Env, "WEBFLOW_SITE_ID" | "WEBFLOW_SITE_API_TOKEN" | "BETTER_AUTH_SECRET" | "BETTER_AUTH_URL" | "PRODUCTION_ORIGIN_URL">> {}
interface ProcessEnv extends StringifyValues<Pick<Cloudflare.Env, "BETTER_AUTH_SECRET" | "BETTER_AUTH_URL" | "WEBFLOW_SITE_ID" | "WEBFLOW_SITE_API_TOKEN">> {}
}

// Begin runtime types
Expand Down
Loading