-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Custom Domains for Territories #1958
Draft
Soxasora
wants to merge
25
commits into
stackernews:master
Choose a base branch
from
Soxasora:custom_domain
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
+959
−34
Conversation
This file contains 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
…customDomain resolver
…itory domains editing
… middleware slight readability
…alues; show DNS configs on territory edit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Tracks the work and strategies for #1942
Adds custom domains for territories with automatic and one-click sign-in.
TBD
Screenshots
tbd
Additional Context
Subject to updates
WIP: Shared Authentication
Login is based on referer, signup redirects to stacker.news
WIP: Login
User goes directly to forum.pizza.com (no referer)
-- One-click sign in: Redirect to api/auth/sync on main domain, if there's a session redirect back with a verification token to use for log-in
User visits forum.pizza.com from stacker.news (referer)
-- Like one-click but automatically
TODO: Signup
The user gets redirected to stacker.news to signup and gets redirected back with the token
WIP: Middleware
cachedFetcher will fetch and cache for 5 minutes the list of domains that are
VERIFIED
on DNS and SSLIf a domain is trying to access stacker news but it's not
VERIFIED
then it will redirect to stacker.news.It redirects to /~territory and rewrites it to /
TODO: Serve subdomains for CNAMEs
We can create record on-demand via Route 53 APIs, though this needs to be researched more.
WIP: Check for correct DNS records
node:dns
library allows for DNS checking, if CNAME and TXT records are set correctly, it will update the custom domain'sdnsState
field asVERIFIED
WIP: Automatic issuing and validation of SSL certificates
Using ACM (AWS Certificate Manager) we can both issue and validate a certificate
WIP: Integrations
DNS Validation
PENDING
domainsIf DNS validation is successful:
SSL Validation
PENDING
as statusIf SSL validation is successful:
???
Profit
TODO: DNS guide on FAQ
FAQ to most populars domain providers. The territory owner will have to set a CNAME and that's it.
A TXT record can be used to validate domain ownership
Checklist
Are your changes backwards compatible? Please answer below:
tbd
On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
tbd
For frontend changes: Tested on mobile, light and dark mode? Please answer below:
tbd
Did you introduce any new environment variables? If so, call them out explicitly here:
DNS_RESOLVER
-> with a fallback to1.1.1.1
inworker/domainVerification.js
Progress
Subject to updates
More
APIs
SSL
DNS
Territory Edit
Domains
Navigation and UI
Middleware
Wallet Sync
Auth Sync
Take care of