Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @supabase/ssr version, add /homepage to redirects array #61

Merged
merged 2 commits into from
Oct 29, 2024

Conversation

dvorakjt
Copy link
Contributor

Checklist

  • Include the corresponding Jira issue key and #done in the PR title, like so: "JRA-123 #done Migrate Election Reminders" N/A
  • Verify that the code compiles (npm run dev)
  • Verify that the project builds (npm run build:local)
  • Verify that all tests pass
  • Verify that unit tests cover 100% of the code
  • Create Storybook stories for visual components N/A
  • Verify that any visual components match the Figma N/A
  • Test with a screen reader (if applicable) N/A
  • Document your code with TSDoc comments
  • Format your code with Prettier

Overview

This PR updates the @supabase/ssr version to version 0.5.1 and updates the usage of said package to reflect the latest example provided by the Supabase docs. The original example was causing intermittent 500 errors because cookies were being set in a Server component, which is not allowed in Next.js and throws an exception. The new docs for this package indicate that the logic inside the setAll method provided to createServerClient should be wrapped in a try...catch block to avoid this situation.

Here is a screenshot of the error:
unhandled rejection

The updated docs can be viewed here.

This PR also adds /homepage to the redirects array in next.config.mjs. /homepage redirects to /. This is necessary because the main 8by8 site (https://8by8.us) contains links to the challenge application. These links currently point to /homepage. Until the main site can be updated, we should redirect users coming from /homepage so that they don't hit our 404 page.

Test Plan

All unit tests pass. I verified that a user visiting /homepage is redirected to /.

Follow ups

We should continue to monitor Vercel logs.

@dvorakjt dvorakjt merged commit b57a98d into 8by8-org:development Oct 29, 2024
1 check passed
dvorakjt added a commit that referenced this pull request Oct 29, 2024
* Fix failing workflow (#57)

* Update ping-supabase.yml

* Update ping-supabase.yml

* Update ping-supabase.yml

* Update schedule-supabase-pings.yml

* Update schedule-supabase-pings.yml

* Update ping-supabase.yml

* CHAL-84 #done - Bug fix (#58)

* set invite cookie same site policy to lax

* added vercel.live to frame-src in CSP

* added meta description tag

* Update @supabase/ssr version, add /homepage to redirects array (#61)

* updated @supabase/ssr version and usage

* added /homepage to redirects array in next.config.mjs
dvorakjt added a commit that referenced this pull request Oct 29, 2024
* Push (#59)

* Fix failing workflow (#57)

* Update ping-supabase.yml

* Update ping-supabase.yml

* Update ping-supabase.yml

* Update schedule-supabase-pings.yml

* Update schedule-supabase-pings.yml

* Update ping-supabase.yml

* CHAL-84 #done - Bug fix (#58)

* set invite cookie same site policy to lax

* added vercel.live to frame-src in CSP

* added meta description tag

* Update @supabase/ssr version and usage (#62)

* Fix failing workflow (#57)

* Update ping-supabase.yml

* Update ping-supabase.yml

* Update ping-supabase.yml

* Update schedule-supabase-pings.yml

* Update schedule-supabase-pings.yml

* Update ping-supabase.yml

* CHAL-84 #done - Bug fix (#58)

* set invite cookie same site policy to lax

* added vercel.live to frame-src in CSP

* added meta description tag

* Update @supabase/ssr version, add /homepage to redirects array (#61)

* updated @supabase/ssr version and usage

* added /homepage to redirects array in next.config.mjs
@dvorakjt dvorakjt deleted the update-supabase-ssr branch November 17, 2024 19:15
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