-
-
Notifications
You must be signed in to change notification settings - Fork 142
custom domains: auth #2908
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
Draft
Soxasora
wants to merge
191
commits into
stackernews:master
Choose a base branch
from
Soxasora:feat/custom-domains-auth
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
custom domains: auth #2908
Changes from all commits
Commits
Show all changes
191 commits
Select commit
Hold shift + click to select a range
c50509a
Custom Domains CRUD, Verification
Soxasora 5e80c3f
Domains refactor, Domain Verification normalization
Soxasora 4d24845
Domains normalization: Attempts, Records, Certificates
Soxasora b624c59
Domain Verification worker adjusted to new schema; use triggers to ch…
Soxasora 89f1eb4
wip: Domain Verification worker, log all verification steps
Soxasora 9d1c137
wip: clearer Domain Verification flow, surround AWS calls with try ca…
Soxasora dc119a8
Domain Verification schema updates
Soxasora 67fb2c8
HOLD the domain and delete the certificate when a territory expires
Soxasora 725ce81
delete the certificate from ACM when we're about to STOP a territory
Soxasora f3930f7
Domain resolver refactor, use transactions, add comments
Soxasora 01e319e
Stages for Domain Verification attempts logging, fix certificate dele…
Soxasora e132ad0
separate ACM certificate requests and validation values
Soxasora cd9cb68
Domains UI/UX enhancements; core fixes to schema; general cleanup
Soxasora 9e96d7c
delete any existing domain verification jobs if we're updating the do…
Soxasora 82a71f5
Log AWS-related error messages; fix deleteCertificate recursion
Soxasora f95ab6a
fix missing await on async customDomainMiddleware
Soxasora 4f49382
Merge branch 'master' into custom_domains_base
Soxasora 2382f3b
hotfix: delete certificate from ACM also on domain removal
Soxasora c732135
Merge branch 'master' into custom_domains_base
huumn ca13d80
prepare for dnsmasq, light cleanup
Soxasora 2a77fd1
fix DNS server typo
Soxasora 072c1ae
don't ask ACM to delete a certificate in a db transaction
Soxasora 7da660a
fix typo
Soxasora d0b9467
better handling of territory changes, ACM certificates and domains in…
Soxasora 2c4ca44
address plpgsql syntax issues, move INSERT for pgboss.schedule in a f…
Soxasora 52dd035
fallback to system's default DNS servers if dnsmasq is not available/…
Soxasora 0a7eda2
better error handling of node:dns resolver
Soxasora e6bd73b
Merge branch 'master' into custom_domains_base
huumn 76be3ae
hotfix: remove the port in dev for domain mapping
Soxasora e0e2dea
add aws container to domains profile
huumn 807c2d3
move existingTXT on a more appropriate place, TODOs on prisma schema
Soxasora e8d97ba
territory redirects and rewrites for middleware, adjust navbar reacti…
Soxasora 476c10b
30 seconds of interval between verification jobs, after 1 hour of dom…
Soxasora ef549a9
also get records when getting the existing domain, recreate the domai…
Soxasora 1e3b1c6
hotfix: use validateSchema the correct way, change from domain to dom…
Soxasora 25674c2
hide custom domains from the world but the admins
Soxasora eddd453
debounce next verification jobs with a singleton key, avoiding other …
Soxasora bbf2b0a
ELBv2 implementation to attach a certificate to a load balancer; Mock…
Soxasora f36eef4
use directly the interested ELB Listener ARN via env vars; get rid of…
Soxasora 51aadf2
throw database and AWS-related errors; don't log the STAGE on critica…
Soxasora 5bf8aba
remove unused certificate attachment to ELB checks
Soxasora 1643c09
remove unused ELB env var, remove useless console.logs
Soxasora d579b55
eradicate TXT records from custom domains; adjust functions to expect…
Soxasora 102b2f2
Merge branch 'master' into custom_domains_base
Soxasora 093910b
pass CNAME record directly instead of the whole records map
Soxasora 0ad0b33
don't delete the domain if resuming from HOLD
Soxasora ebf2c8b
wip: custom domains documentation
Soxasora f361958
docs: explain all the triggers, ACM and ALB implementations, fix head…
Soxasora 6a0b2cc
docs: clearer explanations
Soxasora ac03f32
use locally scoped configs for ACM and ELB APIs
Soxasora 55357e6
cleanup: remove unused domainMapping query from domain resolver
Soxasora 9c0f9e0
Merge branch 'master' into custom_domains_base
Soxasora 4e36bfb
ux: add reset/verify buttons to territory domain config
Soxasora 9021358
temp: snFetch dynamic getAgent import to avoid pulling node's http li…
Soxasora 167eac3
pin localstack to 4.12, enable only s3 and acm localstack mocks
Soxasora a492bc9
update: change NORMAL_POLL_INTERVAL to NORMAL_POLL_INTERVAL_MS
Soxasora e270827
fix: delete old domains that have been on HOLD FOR 30 days or more
Soxasora 4a35e94
domain creation: compact resuming and creation logic, fix duplicate d…
Soxasora 686ba80
[domain-verification] consistent error object return instead of only …
Soxasora 66e6d22
[domain-query] don't expose domain certificates to domain query, only…
Soxasora de8c792
[domain-form] ux: disable domain name input field if domain is regist…
Soxasora ef3bd56
[domain-form] gql: allow null domain names (for removal)
Soxasora b5bee87
[domain-verification] check for null records during DNS verification
Soxasora 76d266c
[domain-verification] cleanup: better verification interval naming
Soxasora 3512f37
[domain-verification] fix: avoid record not found error when trying t…
Soxasora c03caa4
[domain-verification] fix: don't verify domains on HOLD, handles edge…
Soxasora 7a459b9
[domain-form] fix: manual start and stop polling
Soxasora fe3b619
[domain-context]: always set the ssrDomain as the current custom domain
Soxasora 56d8198
Merge branch 'master' into feat/custom-domains-base
Soxasora 66aba73
[domain-verification] fix verification threshold minutes->days typo
Soxasora 7fbd291
[domain-verification] remove startAfter customizable parameter from d…
Soxasora 08398bb
[domain-query] protect from null territory, nullable domainName in SE…
Soxasora 1d69243
[domain-verification] also remove ACM certificates when a domain tran…
Soxasora 16cfd54
[domain-form] show 'active' when domain is fully verified
Soxasora 0c267cb
[domain-form] re-verify domain on HOLD
Soxasora 276b3db
[middleware][navigation] usePrefix and useNavKeys to support custom d…
Soxasora fab26ef
Merge branch 'master' into feat/custom-domains-base
Soxasora 846914f
chore: upgrade Next.js from 14.2.25 to 15.5.14; upgrade to React 19; …
Soxasora ffb119b
Merge branch 'master' into chore/update-nextjs-16
Soxasora e8fedc8
upgrade Bootstrap to 5.3.8; upgrade react-boostrap to 2.10.10; silenc…
Soxasora 8f7e221
upgrade Next.js to 16.2.2, rename middleware.js to proxy.js
Soxasora fd7cb96
polyfill URLPattern and add to js-standard lint globals
Soxasora 29ab41b
upgrade to next-plausible 4.0.0; remove PlausibleProvider dead props
Soxasora 0cf9f68
fix: run withPlausibleProxy through webpack instead of treating it as…
Soxasora da82997
apollo: useLazyQuery now throws AbortError, add errorPolicy 'all' to …
Soxasora 3813e00
apollo migration: remove @client and @defer directives support from A…
Soxasora 4717770
apollo migration: switch now-internal getOperationName with graphql's…
Soxasora 7a6367c
remove Apollo's execute double catch
Soxasora d556244
remove temporary nodejs nextjs 15 middleware workaround
Soxasora cb5b2fd
cleanup: linting
Soxasora a447ba1
Merge branch 'master' into feat/custom-domains-base
Soxasora e6f2f97
export cleanDomainVerificationJobs for resolver and worker
Soxasora 3d6ab69
merge chore/update-nextjs-16
Soxasora f04aa91
adapt to Next.js 16 and Apollo Client 4 changes
Soxasora 41a0307
remove legacyBehavior and passHref, use NextLink as anchor for compon…
Soxasora adf7f35
Merge branch 'chore/update-nextjs-16' into feat/custom-domains-base
Soxasora f9e541f
remove custom domains API endpoint, check domains via cached direct q…
Soxasora d466483
fix: workaround to enable HMR on custom domains
Soxasora 0d749ac
remove default `.sndev` suffix from `next.config.js`, move to `.env.d…
Soxasora fa17f5b
remove old comment about sndev being always included
Soxasora 0d154c0
correct again allowedDevOrigins usage
Soxasora c0d6934
correct forceRefreshThreshold and cacheExpiry usage; lower to 5 minut…
Soxasora 8c25df3
simple logger for custom domains gated by NEXT_PUBLIC_CUSTOM_DOMAINS_…
Soxasora c8119e8
merge custom-domains-authsync
Soxasora d999ba0
sync: support local custom domains with port, default / redirectUri
Soxasora 2c35d71
remove Sorts spacings on the desktop second top bar to compensate for…
Soxasora f140a83
Merge branch 'feat/custom-domains-base' into feat/custom-domains-auth
Soxasora 2ae1b0d
Merge branch 'master' into chore/update-nextjs-16
Soxasora 8104700
Merge branch 'chore/update-nextjs-16' into feat/custom-domains-base
Soxasora 07f67dd
Merge branch 'feat/custom-domains-base' into feat/custom-domains-auth
Soxasora af6db57
fix: case-insensitive domains per RFC 4343, domain saved to lower case
Soxasora 4987a25
fix: invert cacheExpiry and forceRefreshThreshold values
Soxasora d8c0630
cast string `me.id` to `Number`
Soxasora e546381
fix: return null for empty domain records instead of an empty array (…
Soxasora 96fd1f0
fix: allowedDevOrigins starts by default with NEXT_PUBLIC_URL, new AL…
Soxasora d7e6c3a
fix: put allowedDevOrigins in the right next.config.js section
Soxasora dbbb4ce
merge chore/update-nextjs-16
Soxasora f79b1ce
Merge branch 'feat/custom-domains-base' into feat/custom-domains-auth
Soxasora 4fe5edc
fix: normalize custom domains debug env var in constants.js
Soxasora 3686e8d
fix: don't treat domain name changes as resuming from HOLD (even if s…
Soxasora d72d3a3
cleanup: explicit territory-domains form steps
Soxasora 64badaa
Merge branch 'feat/custom-domains-base' into feat/custom-domains-auth
Soxasora 59c5e76
disable lurker signup button on custom domains (conflicts with one-cl…
Soxasora 7728d00
cleanup: make some sense out of the various timings
Soxasora dde60f1
fix: update the domain status only if it has changed
Soxasora 2b363f8
Merge branch 'feat/custom-domains-base' into feat/custom-domains-auth
Soxasora 5324862
merge master, adapt changes to Apollo Client v4
Soxasora 5b55a11
Merge branch 'chore/update-nextjs-16' into feat/custom-domains-base
Soxasora 8cf4cb2
Merge branch 'feat/custom-domains-base' into feat/custom-domains-auth
Soxasora 5ff7144
security: domain-specific JWTs, remove pre-existing custom domain hea…
Soxasora 539b2a5
Merge branch 'master' into chore/update-nextjs-16
huumn 85d3e80
fix: switch back to notifyOnNetworkStatusChange false to get the orig…
Soxasora 1a2b129
remove dangling sub prop
Soxasora e5c99c6
filter AbortError from useLazyQuery executions
Soxasora 977a56b
Merge branch 'chore/update-nextjs-16' into feat/custom-domains-base
Soxasora 2b790f6
Merge branch 'feat/custom-domains-base' into feat/custom-domains-auth
Soxasora aebe054
Merge branch 'master' into feat/custom-domains-base
Soxasora 7da5141
Merge branch 'feat/custom-domains-base' into feat/custom-domains-auth
Soxasora 2ca0b78
fix: create domain verification records even when resuming from HOLD
Soxasora 5960ac4
fix: normalize retrieved DNS CNAME records, hostname equality check
Soxasora 108bd45
fix: update updated_at of Domain when transitioning to HOLD via db tr…
Soxasora 2b10305
remove useless/unused Sub.domain
Soxasora 5f57c77
don't consider x-forwarded-host
Soxasora c2ea2e5
protect from multiple CNAMEs at the same name
Soxasora f4fb87e
Merge branch 'feat/custom-domains-base' into feat/custom-domains-auth
Soxasora 8d71482
protect from token hijacking with versioned JWTs and periodic DNS checks
Soxasora 8c99bce
Merge branch 'master' into feat/custom-domains-base
Soxasora da785ae
update package-lock.json
Soxasora 4a5a87a
Merge branch 'feat/custom-domains-base' into feat/custom-domains-auth
Soxasora ee74adb
cleanup: remove postponed changes to RSS (+seo), consistency with master
Soxasora aba427b
cleanup: explicit 3 retries after unrecoverable domain verification fail
Soxasora 9a79de1
fix: use CUSTOM_DOMAINS_DEBUG for domains cached fetcher debug
Soxasora da1a650
cleanup: use DOMAIN_VERIFICATION_RETRY_LIMIT to check max retrycount …
Soxasora 3e8389f
wrap post-failure cleanup in a try/catch to avoid masking the origina…
Soxasora 63f44ac
safer territory path checks
Soxasora bc9933c
reduce AWS calls by reusing already-latest certificate description; m…
Soxasora 3e6adba
merge feat/custom-domains-base
Soxasora 4defce7
remove orphan Sub.domain resolver and typedef
Soxasora c4dd809
add IdempotencyToken to ACM certificate requests to always return the…
Soxasora f731808
cleanup: remove dead code in attachACMCertificateToELB
Soxasora a4b0e1a
cleanup: simplify DomainProvider, remove useEffect no-op previously u…
Soxasora 6e372f1
cleanup: basic rel for external territory badges
Soxasora da0c969
cleanup: remove useless domainName and subName indexes on Domain, the…
Soxasora cc3d494
correct localstack docker hostname for media-check comment
Soxasora 0884742
cleanup: update docs
Soxasora d8416a5
comprehensive subdomain regex
Soxasora c80b68e
fix: me can be null, protect from crash
Soxasora 616ce1f
Merge branch 'master' into feat/custom-domains-base
huumn 080a638
cleanup: simplify DomainProvider
Soxasora 5b8ce0b
terminal ACM states now stops domain verification, will put domain on…
Soxasora db798b3
territory form: required non-empty domain input field
Soxasora 742a53d
simplify getACMValidationValues return
Soxasora 832b462
export NEXT_PUBLIC_CUSTOM_DOMAINS_DEBUG env var to service worker
Soxasora e6a966a
explicit DOMAIN_BETA_IDS for custom domains access
Soxasora a65d7b4
getDomainMappingFromRequest helper to get and validate custom domain …
Soxasora 9eab96c
Merge branch 'master' into feat/custom-domains-base
Soxasora d61a2a4
fix: support both NextRequest and Node requests; fix: return a domain…
Soxasora a71337c
fix: use hostname instead of host for custom domain <-> sn main domai…
Soxasora 8d93f92
revert a4b0e1a simplify DomainProvider
Soxasora 7a91a61
merge feat/custom-domains-base
Soxasora c0c0953
exp: move auth UI to stacker.news, login with nym button
Soxasora 76ced42
add support for callbackUrl, cleanup
Soxasora 19008fc
fix signup, authRequired redirects and callbackUrl
Soxasora 0435861
redirect to custom domain auth sync on login/signup via nextauth
Soxasora b896297
reminder: unify with nextauth custom redirect
Soxasora 70d8ce4
merge master
Soxasora fc608d0
Merge branch 'master' into feat/custom-domains-auth
huumn f690831
better login with nym button, dropdown to select an account before sy…
Soxasora 104272f
respect the rules of hooks
Soxasora dcf3192
protect redirectUri from hosting an open redirect
Soxasora b10f97b
Merge branch 'master' into feat/custom-domains-auth
Soxasora File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.