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

Custom Domains for Territories #1958

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Soxasora
Copy link
Member

@Soxasora Soxasora commented Mar 9, 2025

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
Note: This is at the moment unsafe and only a proof of concept

Login
  1. User goes directly to forum.pizza.com (no referer)
    -- TODO: One-click sign in: If the user is already logged in on stacker.news, transfer the auth cookies

  2. User visits forum.pizza.com from stacker.news (referer)
    -- WIP: Automagical redirect with auth cookies from stacker.news

TODO: Signup

The user gets redirected to stacker.news to signup and gets redirected back with the auth cookies

TODO: Saving custom domains

cachedFetcher will fetch and cache for 5 minutes the list of domains that are VERIFIED

TODO: Serve subdomains for CNAMEs

We can create record on-demand via Route 53 APIs, though this needs to be researched more.

TODO: Automatic SSL certificates

AWS Certificate Manager can be controlled with their API to provide ssl certificates on-demand

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:
tbd

Progress

Subject to updates

Personalization

  • customizable branding, color scheme

SSL

  • issue SSL certificates automatically via ACM API

DNS

  • DNS verification and validation
  • DNS guide on FAQ
  • serve subdomain for territory with custom domain via Route53 API

Territory Edit

  • save custom domain in DB via Territory Edit
    -- Custom Domains relation handling via resolver
  • show values from customDomain

Domains

  • Paid Action
  • cached API endpoint for custom domains map
  • custom domain table

Navigation

  • Sub Select: redirect to custom domain if any

Middleware

  • consider Referral Cookies
  • better management of territory paths
  • WIP redirect and rewrite of territories

Auth Sync

  • one click login if directly visiting a custom domain
  • encrypt cookies and decrypt them on arrival OR switch to verification request
  • redirect to custom domain with main domain's cookies and save them
  • sync auth only if coming from main domain

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.

1 participant