diff --git a/app/auth/DeleteAccountModal.jsx b/app/auth/DeleteAccountModal.jsx
new file mode 100644
index 0000000..4ecec64
--- /dev/null
+++ b/app/auth/DeleteAccountModal.jsx
@@ -0,0 +1,115 @@
+import { h, Component } from "preact";
+import linkState from "linkstate";
+
+import api from "api.js";
+import errors from "errors.js";
+
+import Modal from "ui/Modal.jsx";
+
+export default class DeleteAccountModal extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ loading: false,
+ error: "",
+
+ stage: 0,
+ password: ""
+ };
+ }
+
+ close() {
+ this.props.openModal("");
+ }
+
+ continueDelete() {
+ this.setState({
+ stage: 1
+ });
+ }
+
+ finishDelete() {
+ this.setState({
+ loading: true,
+ error: ""
+ }, () => {
+ api.post("auth/requestAccountDelete", {
+ password: this.state.password,
+ clientType: "web"
+ }, (data) => {
+ if (data.status == "ok") {
+ this.setState({
+ loading: false,
+ stage: 2
+ });
+ } else {
+ if (data.error == "creds_incorrect") {
+ this.setState({
+ loading: false,
+ error: "The password was incorrect."
+ });
+ return;
+ }
+
+ this.setState({
+ loading: false,
+ error: errors.getFriendlyString(data.error)
+ });
+ }
+ });
+ });
+ }
+
+ keyup(e) {
+ if (e.keyCode == 13) {
+ this.finishDelete();
+ }
+ }
+
+ render(props, state) {
+ if (state.stage == 1) {
+ return To delete your account, confirm your password. Your account has been scheduled for deletion within 48 hours. If you decide to cancel this request, email hello@myhomework.space as soon as possible. Confirmation of this has been sent to your email, and you will receive a second email once your account is deleted. Note that some of your data might remain on our systems even after your account is deleted - for example, your account might still be present in our automated database backups. You can request deletion of your account. All of your homework, classes, and calendar events will be deleted. This action cannot be undone.