(core) streamline registration flow for new appsumo users

Summary:
This adds a new landing page for cognito sign-up, intended for
use by new appsumo users.

Their email address is pre-filled and locked down, and sign-up
is by entering a password.

The page is very crude compared to hosted cognito - especially
in error reporting! - but having the address filled in more
than makes up for that.

The flow does not quite connect with the new billing signup.
I think we can do that through the regular "welcome" process,
which will list the user's team site.  When the user visits
that site, we could detect that we are on a site with no
domain set yet and for which the user is a billing manager,
and trigger a visit to the appropriate billing page.

Test Plan: manual - hard to test through cognito email step

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2880
This commit is contained in:
Paul Fitzpatrick
2021-06-25 10:00:01 -04:00
parent 305b133c59
commit 36d5e7870e
4 changed files with 170 additions and 10 deletions

View File

@@ -989,6 +989,11 @@ export class FlexServer implements GristServer {
this._redirectToLoginWithoutExceptionsMiddleware,
];
// These are some special-purpose pre-sign-up welcome pages, with no middleware.
this.app.get(['/welcome/signup', '/welcome/verify'], expressWrap(async (req, resp, next) => {
return this._sendAppPage(req, resp, {path: 'app.html', status: 200, config: {}, googleTagManager: true});
}));
this.app.get('/welcome/:page', ...middleware, expressWrap(async (req, resp, next) => {
return this._sendAppPage(req, resp, {path: 'app.html', status: 200, config: {}, googleTagManager: true});
}));