Updating supabase middleware away from deprecated createServerClient method
The Supabase team has published the recommended replacement code, which I'm transplanting over here. See https://github.com/supabase/supabase/blob/e77f8b9f398a8436aa37f93b443620081211e1bc/apps/docs/content/guides/auth/server-side/nextjs.mdx?plain=1#L221-L283
Solves https://github.com/vercel/nextjs-subscription-payments/issues/358
@k-thornton is attempting to deploy a commit to the Vercel Solutions Team on Vercel.
A member of the Team first needs to authorize it.
This looks good and inline with the Supabase recommendations so is it being reviewed and merged anytime soon? :)
Thank for you opening a PR to make this example better.
We are sunsetting this example in favor of a newer, more modern SaaS starter example.
You can check it out here -> https://github.com/nextjs/saas-starter