appName: isAppPrefix()

in src/server/routes/welcome.ts [76:140]


					appName: isAppPrefix(app) ? getAppName(app) : undefined,
				},
			}),
		});
		return res.type('html').send(html);
	},
);

// consent page for post social registration - google
router.get(
	'/welcome/google',
	loginMiddlewareOAuth,
	(_: Request, res: ResponseWithRequestState) => {
		const html = renderer('/welcome/google', {
			pageTitle: 'Welcome',
			requestState: res.locals,
		});
		res.type('html').send(html);
	},
);

// consent page for post social registration - apple
router.get(
	'/welcome/apple',
	loginMiddlewareOAuth,
	(_: Request, res: ResponseWithRequestState) => {
		const html = renderer('/welcome/apple', {
			pageTitle: 'Welcome',
			requestState: res.locals,
		});
		res.type('html').send(html);
	},
);

// form handler for consent page for social registration
router.post(
	'/welcome/social',
	loginMiddlewareOAuth,
	handleAsyncErrors(async (req: Request, res: ResponseWithRequestState) => {
		const state = res.locals;
		if (!requestStateHasOAuthTokens(state)) {
			return res.redirect(
				303,
				addQueryParamsToUntypedPath(signInPageUrl, state.queryParams),
			);
		}

		try {
			const registrationConsents = bodyFormFieldsToRegistrationConsents(
				req.body,
			);

			// update the registration platform for social users, as we're not able to do this
			// at the time of registration, as that happens in Okta
			await updateRegistrationPlatform({
				accessToken: state.oauthState.accessToken,
				appClientId: state.queryParams.appClientId,
				ip: req.ip,
			});

			const runningInCypress = process.env.RUNNING_IN_CYPRESS === 'true';

			// update the consents and go to the finally block
			if (registrationConsents.consents?.length) {
				try {