mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-03-21 17:24:28 -05:00
Merge pull request #412 from PretendoNetwork/feat/mississippi
Some checks failed
Build and Publish Docker Image / build-publish (push) Has been cancelled
Some checks failed
Build and Publish Docker Image / build-publish (push) Has been cancelled
Mississippi/birthdays
This commit is contained in:
commit
6a9ddda4b9
|
|
@ -112,7 +112,13 @@ router.get('/register', async (request, response) => {
|
|||
});
|
||||
|
||||
router.post('/register', async (request, response) => {
|
||||
const { email, username, mii_name, password, password_confirm, 'h-captcha-response': hCaptchaResponse } = request.body;
|
||||
const { email, username, mii_name, birthday, password, password_confirm, 'h-captcha-response': hCaptchaResponse } = request.body;
|
||||
|
||||
// * IP must be forwarded to the account server so we can check for age related issues based on region.
|
||||
// * This is NEVER recorded in our records, ever. See https://github.com/PretendoNetwork/account/pull/194
|
||||
// * for more details. Once the IP is used to query for location, both the IP and location are disregarded
|
||||
// * and no data is stored for blocked users
|
||||
const ip = request.ip; // TODO - Enable `CF-IPCountry` in Cloudflare and only use this as a fallback
|
||||
|
||||
response.cookie('email', email, { domain: '.pretendo.network' });
|
||||
response.cookie('username', username, { domain: '.pretendo.network' });
|
||||
|
|
@ -120,9 +126,11 @@ router.post('/register', async (request, response) => {
|
|||
|
||||
try {
|
||||
const tokens = await util.register({
|
||||
ip,
|
||||
email,
|
||||
username,
|
||||
mii_name,
|
||||
birthday,
|
||||
password,
|
||||
password_confirm,
|
||||
hCaptchaResponse
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ const { http: { port } } = config;
|
|||
const app = express();
|
||||
// const stripe = new Stripe(config.stripe.secret_key);
|
||||
|
||||
app.set('trust proxy', true); // TODO - Make this configurable
|
||||
|
||||
logger.info('Setting up Middleware');
|
||||
app.use(morgan('dev'));
|
||||
// app.use(express.json());
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@
|
|||
<label for="mii_name">{{ locale.account.loginForm.miiName }}</label>
|
||||
<input name="mii_name" id="mii_name" value="{{ mii_name }}" maxlength=10 required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="birthday">Birthday</label> {{! TODO - Add this to weblate, hard-coding for now to just push it out }}
|
||||
<input type="date" id="birthday" name="birthday">
|
||||
</div>
|
||||
<br>
|
||||
<div>
|
||||
<label for="password">{{ locale.account.loginForm.password }}</label>
|
||||
<input name="password" id="password" type="password" autocomplete="new-password" minlength="6" maxlength="16" required>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user