Skip to content

[edge-functions/jwt-authentication] Fix for breaking changes in Next.js canary#443

Merged
lfades merged 1 commit into
mainfrom
fix-jwt-authentication-example
Nov 2, 2022
Merged

[edge-functions/jwt-authentication] Fix for breaking changes in Next.js canary#443
lfades merged 1 commit into
mainfrom
fix-jwt-authentication-example

Conversation

@nuta

@nuta nuta commented Nov 2, 2022

Copy link
Copy Markdown
Contributor

Some following breaking changes were introduced in Next.js canary. This PR includes fixes for them.

In addition to that, it also adds a runtime check to throw user-friendly error if $JWT_SECRET_KEY is missing.

Description

Demo URL

Type of Change

  • New Example
  • Example updates (Bug fixes, new features, etc.)
  • Other (changes to the codebase, but not to examples)

New Example Checklist

  • 🛫 npm run new-example was used to create the example
  • 📚 The template wasn't used but I carefuly read the Adding a new example steps and implemented them in the example
  • 📱 Is it responsive? Are mobile and tablets considered?

@vercel

vercel Bot commented Nov 2, 2022

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
build-output-api-edge-functions ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
build-output-api-edge-middleware ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
build-output-api-image-optimization ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
build-output-api-isr ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
build-output-api-overrides ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
build-output-api-prerender-functions ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
build-output-api-preview-mode ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
build-output-api-routes ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
build-output-api-serverless-functions ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
build-output-api-static-files ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
build-output-api-wildcard ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-ab-testing-google-optimize ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-ab-testing-statsig ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-api-routes-cache-control ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-api-routes-hello-world ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-api-routes-json-response ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-api-routes-query-parameters ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-ab-testing-simple ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-functions-add-header ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-api-rate-limit ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-api-rate-limit-and-tokens ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-authed-proxy ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-basic-auth-password ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-bot-protection-botd ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-bot-protection-datadome ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-functions-cookies ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-functions-cors ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-crypto ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-feature-flag-configcat ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-functions-feature-flag-posthog ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-functions-feature-flag-split ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-functions-geolocation ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-hostname-rewrites ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-i18n ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-image-response ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-ip-blocking ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-ip-blocking-datadome ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-functions-json-response ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-jwt-authentication ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-news ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-power-parity-pricing ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-power-parity-pricing-strategies ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-functions-query-params-filter ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-functions-redirects-upstash ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-maintenance-page ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
edge-rewrites-upstash ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
edge-user-agent-based-rendering ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
example-auth-with-ory ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
example-feature-flag-apple-store ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
example-reduce-image-bandwidth-usage ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
feature-flag-optimizely ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
i18n ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
mint-nft ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
solutions-combining-data-fetching-strategies ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
solutions-image-fallback ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
solutions-image-offset ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
solutions-loading-web-fonts ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
solutions-microfrontends ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
solutions-microfrontends-docs ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
solutions-monorepo ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
solutions-on-demand-isr ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
solutions-pagination-with-ssg ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
solutions-reuse-responses ❌ Failed (Inspect) Nov 2, 2022 at 1:25PM (UTC)
solutions-script-component-ad ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
solutions-script-component-strategies ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)
solutions-subdomains-auth ✅ Ready (Inspect) Visit Preview Nov 2, 2022 at 1:25PM (UTC)

@nuta

nuta commented Nov 2, 2022

Copy link
Copy Markdown
Contributor Author

BTW, this would be very confusing for people (even for me) to have two different APIs with the same method names (e.g. cookies.set)... Is there a good way to clarify breaking changes like this?

Comment thread edge-functions/jwt-authentication/pages/protected.tsx
@lfades lfades merged commit 486f834 into main Nov 2, 2022
@nuta nuta deleted the fix-jwt-authentication-example branch April 9, 2025 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants