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

init: webflow oauth integration #1589

Merged
merged 7 commits into from
Oct 2, 2024
Merged

init: webflow oauth integration #1589

merged 7 commits into from
Oct 2, 2024

Conversation

abvthecity
Copy link
Contributor

@abvthecity abvthecity commented Oct 2, 2024

Integrates oauth callback using webflow.

notes:

  • new api route /api/fern-docs/oauth/webflow/callback is created to disambiguate from the ory and workos callback urls. this is important so that webflowclient is compiled separately from ory and workos, otherwise the edge function will eventually blow up in size (and fail to compile)
  • new api route /api/fern-docs/oauth/ory/callback is created with a permanent redirect to it from /api/fern-docs/auth/callback. someone needs to reach out to rightbrain to update their actual callback urls, but this should work in the interim.

what's next:

what i'm not a fan of:

  • theres some weird hackery magic going on in the ory-based oauth flow that needs to be reconsidered. @RohinBhargava i've added some TODO comments to indicate where.
  • i'm not really sure what the error stuff does (if it does anything) and whether or not it is ory-specific. need to double check webflow's docs on oauth
  • i actually think we have a really convoluted setup. we should really have a centralized auth.ferndocs.com for all the auth and oauth logic. Mainly because redirect urls are really really hard to change once they're set.
  • the nice thing about vercel edge functions is that it has ultra low-latency, and runs globally. if we were to migrate to a central source of truth, we should consider using cloudflare workers.

@abvthecity abvthecity marked this pull request as ready for review October 2, 2024 23:00
@abvthecity abvthecity requested a review from dsinghvi as a code owner October 2, 2024 23:00
@abvthecity abvthecity enabled auto-merge (squash) October 2, 2024 23:00
Copy link

github-actions bot commented Oct 2, 2024

Playwright test results

passed  1 passed

Details

stats  1 test across 1 suite
duration  9 seconds
commit  6a16378

Copy link

github-actions bot commented Oct 2, 2024

PR Preview

Copy link

github-actions bot commented Oct 2, 2024

📦 Next.js Bundle Analysis for fern-platform-monorepo

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 241.16 KB (🟢 -16.12 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

New Page Added

The following page was added to the bundle from the code in this PR:

Page Size (compressed) First Load % of Budget (350 KB)
/404 447 B 241.6 KB 69.03%

Two Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/dynamic/[host]/[[...slug]] 54.06 KB 295.22 KB 84.35% (🟢 -6.59%)
/static/[host]/[[...slug]] 54.06 KB 295.22 KB 84.35% (🟢 -6.59%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

Copy link

github-actions bot commented Oct 2, 2024

Playwright test results

passed  81 passed

Details

stats  81 tests across 3 suites
duration  1 minute, 16 seconds
commit  6a16378

@abvthecity abvthecity had a problem deploying to Preview - app.buildwithfern.com October 2, 2024 23:45 — with GitHub Actions Error
@abvthecity abvthecity had a problem deploying to Preview - app-dev.buildwithfern.com October 2, 2024 23:45 — with GitHub Actions Error
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