This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Commit a138bf7
Next.js 14 & Supabase SSR (#278)
* Update helpers.ts
Handle empty as well as missing env variables
* Update helpers.ts
Re-added comments
* Update helpers.ts
Reduced line length and restored chaining operators just in case there's a good reason for including them.
* Support propagating product deletion to DB
* initial
* Replace 'var' with 'const'
* add toast
* add password recovery
* fixes
* implement open PRs
* implement more PRs
* fix createOrRetrieveCustomer
* Give button a displayName for logging purposes
* Created a 'Card' ui component
* Remove deprecated supabase auth helpers and update
workflows for creating supabase client
* use latest stripe api version, remove payment type
constraint, change trial handling per stripe docs
* Replaced trial_end with trial_period_days
* Add signout as server action, move server calls
* Added toasts
* 'message' -> 'status' or 'error' in toast calls
* Removed ring focus from toasts container and
simplified some error message handling on the account page
* Remove obsolete NextJS config
* Update route.ts
Throw error if Stripe webhook secret is missing to prevent failure during compile
* Merged branch pr200 into dev
* Rolled back stripe API version change
* Allow stripe-js to use user's default API version
* Update dependencies to latest
* refactor supabase auth
* add magic link/otp auth
-update types
* Update package.json
* Implement half-working password recovery
* Added signup, password signin, password reset
* Updated dependencies
* Squashed commit of the following:
commit ddadebc
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Sun Dec 3 17:59:42 2023 -0500
Updated dependencies
commit cfb1137
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Sun Dec 3 17:57:42 2023 -0500
Added signup, password signin, password reset
commit 77f0724
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Fri Dec 1 13:00:09 2023 -0500
Implement half-working password recovery
commit 89fb774
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 23:17:19 2023 -0500
Update dependencies to latest
commit ac26a2e
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 23:03:12 2023 -0500
Allow stripe-js to use user's default API version
commit e50fc43
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 22:12:34 2023 -0500
Rolled back stripe API version change
commit 16a8e8a
Merge: 1b6dca8 4446b80
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 22:07:41 2023 -0500
Merge branch 'stripe-checkout' into dev
commit 1b6dca8
Merge: f06fd3c d6667d0
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 21:45:44 2023 -0500
Merge branch 'toasts' into dev
commit f06fd3c
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 21:42:06 2023 -0500
Merged branch pr200 into dev
commit 3fc4962
Merge: ad95b6d 289bcea
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 21:37:07 2023 -0500
merged supabase-auth branch
commit ad95b6d
Merge: 4fad338 1a0cd38
Author: Christopher Carroll Smith <75859865+chriscarrollsmith@users.noreply.github.com>
Date: Wed Nov 29 21:28:08 2023 -0500
Merge pull request #5 from chriscarrollsmith/ui-refactor
UI refactor
commit 4fad338
Merge: 4f5b603 2f9aa32
Author: Christopher Carroll Smith <75859865+chriscarrollsmith@users.noreply.github.com>
Date: Wed Nov 29 21:21:22 2023 -0500
Merge pull request #3 from chriscarrollsmith/issue269
Replace 'var' with 'const'
commit 4f5b603
Merge: c7867b2 1506472
Author: Christopher Carroll Smith <75859865+chriscarrollsmith@users.noreply.github.com>
Date: Wed Nov 29 21:19:01 2023 -0500
Merge pull request #2 from chriscarrollsmith/issue170
Issue170
commit 1506472
Author: Christopher Carroll Smith <75859865+chriscarrollsmith@users.noreply.github.com>
Date: Wed Nov 29 21:18:39 2023 -0500
Update route.ts
Throw error if Stripe webhook secret is missing to prevent failure during compile
commit d6667d0
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 19:39:42 2023 -0500
Remove obsolete NextJS config
commit 1b41ef8
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 19:17:16 2023 -0500
Removed ring focus from toasts container and
simplified some error message handling on the account page
commit c57bf26
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 17:38:30 2023 -0500
'message' -> 'status' or 'error' in toast calls
commit 41f6875
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 13:37:39 2023 -0500
Added toasts
commit 289bcea
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Wed Nov 29 12:54:43 2023 -0500
Add signout as server action, move server calls
commit 4446b80
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Tue Nov 28 21:40:57 2023 -0500
Replaced trial_end with trial_period_days
commit 44b481a
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Tue Nov 28 21:02:39 2023 -0500
use latest stripe api version, remove payment type
constraint, change trial handling per stripe docs
commit 4b64f0b
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Tue Nov 28 20:14:33 2023 -0500
Remove deprecated supabase auth helpers and update
workflows for creating supabase client
commit 1a0cd38
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Tue Nov 28 16:23:46 2023 -0500
Created a 'Card' ui component
commit a6644a3
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Tue Nov 28 12:30:30 2023 -0500
Give button a displayName for logging purposes
commit 2f9aa32
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Mon Nov 27 18:45:01 2023 -0500
Replace 'var' with 'const'
commit 2468bf2
Author: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Date: Fri Nov 17 10:20:51 2023 -0500
Support propagating product deletion to DB
commit 0b7597f
Author: Christopher Carroll Smith <75859865+chriscarrollsmith@users.noreply.github.com>
Date: Tue Nov 14 15:29:30 2023 -0500
Update helpers.ts
Reduced line length and restored chaining operators just in case there's a good reason for including them.
commit e679650
Author: Christopher Carroll Smith <75859865+chriscarrollsmith@users.noreply.github.com>
Date: Tue Nov 14 15:16:00 2023 -0500
Update helpers.ts
Re-added comments
commit fd3e0f2
Author: Christopher Carroll Smith <75859865+chriscarrollsmith@users.noreply.github.com>
Date: Tue Nov 14 15:04:31 2023 -0500
Update helpers.ts
Handle empty as well as missing env variables
* API routes for the various auth pathways
* Updated dependencies
* Eliminated API endpoints
* Added simple switches in auth-helpers.ts to
control allowed signin methods
* Refactor/streamline createOrRetrieveCustomer
* getURL now takes a path argument and handles leading slashes
* Fixed bug that broke checkout session if trial period was not set
* Cascade user deletion through database
Add toast error handling to checkout and portal APIs
Fix bug that prevented email rate limit errors being logged
* Added full support for toast error handling when
creating customer portal link and checkout session
* repaired/improved Stripe webhook error handling
Added cascading user delete to supabase migrations
* - Added Suspense around Toaster per NextJS docs on `useSearchParams`
- Handled signup case where emails are disabled in Supabase
* Added package.json npm command for stripe fixtures
* Fixed mishandled magic link condition and handled default sign-in view with a cookie
* Handled edge case where user's preferredSignInView
cookie value is not an allowed viewType
* - gitignored some local dev files
- removed rendundant redirect in oauth callback
- added signin success toast for oauth
* - gitignored some local dev files
- removed some redundant redirects for oauth sign in
- added a success toast for oauth sign in
* Enhanced control of routing and redirects
- Added boolean toggle to control whether routing from sign-in page goes through server or client (because screen flickers with server-side routing)
- Added helper functions to construct toast redirect paths
- Refactored auth-helpers for modularity
* Deleted defunct Card components
Moved Pricing component to a component folder
* Toaster passes through additional searchParams\nDisable button after magic link requests
* Separated server and client Navbar components
(facilitates resource sharing and rehydration)
* Simplified sign-in redirect
(possible now that server and client are separated)
* Sorted stripe helpers into client and server files
* gitignore vscode workspace settings
* Replaced stripe checkout API with server action
Fixed bug in calculating trial end date
* Replace Stripe portal API with server action
Added some server side error logging
* Update middleware.ts
Co-authored-by: Jon Meyers <jonathon.d.meyers@gmail.com>
* Delete next.config.js
* Disable buttons while submitting, fix password reset bug
* - Separate client/server account functions
(Fixes bug that only occurs in prod)
- Generate error redirects on server side
(since Vercel doesn't expose the error object to the client)
* Fixed missing leading slash in error redirect
Allowed dynamic source path for stripe checkout
* bump packages
-comment out NEXT_PUBLIC_SITE_URL (easy to mess up in local dev, automatically substitutes localhost:3000)
-remove double /
-remove pnpm-lock (readme specifies npm or yarn)
* Add display index to Stripe fixtures
* Redirect to home page on successful signup
(Ensures that password autosave gets triggered)
* Set default trial period with a variable
Fix off-by-one calculation of trial period end date
* Updated dependencies
Moved checkout session redirect generation to server
(Since NextJS doesn't expose the error object on the client)
* Universally implement loading dots
Simplify/refactor Pricing component
Avoid leaking email addresses in toast
* Handle database migrations appropriately
* Added Supabase local development workflow
Updated prices table schema to reflect Stripe changes
Added robust RLS to users, customers, and subscriptions
Cascaded auth changes to users, customers, and subscriptions
* Script to link to supabase remote
* Fixed some bugs in link implementation
* Removed accidental redundant file
* Enable buttons when user is not logged in
* Fixed supabase:migrate command
(now migrates database schema changes from local to remote rather than the other way around
* Fixed AuthApiError that arises in testing
if logged in with cookie for user deleted from database
* Documented how to develop locally with Supabase
* bump again
- use turbo for local dev
- fix confirmation email status
- trim user input
- prevent user from updating to same name or email
* Ignore svg routes in middleware pattern matcher
* update dependencies, use turbo for local dev
* Correctly export Next Metadata
* fix regex on middleware matcher
* fix case on Next.js
* refactor cookies to helpers
* add prettier script
* cleanup and bump
- fix nextjs logo size on mobile
- fix logo cloud spacing on mobile
- fix navigation buttons not showing on mobile
- bump packages
- improve sign in wording clarity
- drop name requirement on sign up (supabase will collect the name data if the user runs the schema sql)
- re-add schema.sql (why was this dropped?)
- add trimming to form data
---------
Co-authored-by: Christopher Carroll Smith <75859865+chriscarrollsmith@users.noreply.github.com>
Co-authored-by: Christopher Carroll Smith <chriscarrollsmith@gmail.com>
Co-authored-by: Jon Meyers <jonathon.d.meyers@gmail.com>1 parent c7867b2 commit a138bf7
File tree
74 files changed
+6430
-3352
lines changed- app
- account
- api
- create-checkout-session
- create-portal-link
- webhooks
- auth
- callback
- reset_password
- signin
- [id]
- components
- icons
- ui
- AccountForms
- AuthForms
- Button
- Card
- LogoCloud
- Pricing
- Toasts
- fixtures
- styles
- supabase
- migrations
- utils
- auth-helpers
- stripe
- supabase
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
74 files changed
+6430
-3352
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
11 | | - | |
12 | | - | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
| 50 | + | |
49 | 51 | | |
50 | | - | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
125 | | - | |
126 | | - | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
134 | 172 | | |
135 | 173 | | |
136 | 174 | | |
| |||
142 | 180 | | |
143 | 181 | | |
144 | 182 | | |
145 | | - | |
| 183 | + | |
146 | 184 | | |
147 | 185 | | |
148 | 186 | | |
149 | 187 | | |
150 | 188 | | |
151 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
152 | 193 | | |
153 | 194 | | |
154 | 195 | | |
| |||
175 | 216 | | |
176 | 217 | | |
177 | 218 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| |||
This file was deleted.
0 commit comments