Skip to content

Migrate Domain #3

@SanderGi

Description

@SanderGi

Currently the main url for this site is https://scat6-web.web.app. This is a free Firebase subdomain. It would would be good to move the site to a domain where we have full control, i.e., https://scat.sandergi.com, in case at some point it becomes best to move off Firebase as a hosting solution or we need to do something that requires setting custom DNS records. The idea is to just have the Firebase domain redirect to the new domain. The tricky thing here is that data is not stored in a central database that the new domain can just point to. For privacy reasons, it is stored locally in localstorage and sessionstorage in the user’s browser. We therefore need to migrate over the data the first time the user is redirected from the firebase domain to the new one. I imagine this could reasonably be done by opening the firebase site in an iframe to a /migrate path that instructs it to use postMessage to send over the data. Then merging logic similar to GDrive sync can be used to port over the user data. For security reasons, we’ll need to make sure to do proper domain checks so the data isn’t accidentally handed out to bad actors. We will also need to handle a graceful fallback for the 5% of users where postMessage is not supported. I think it would be reasonable to just show a popup requesting they copy paste over some config manually. Lastly we will have to handle being interrupted early if the user quits the site for some reason and/or instruct the user to not quit while the migration is happening. To be safe, we will leave the data on the old firebase domain intact. That way in case something goes wrong with the migration, we can still help users recover it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions