Add keypair to local account
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import * as uuid from 'uuid';
|
||||
import * as express from 'express';
|
||||
import * as bcrypt from 'bcryptjs';
|
||||
import { generate as generateKeypair } from '../../crypto_key';
|
||||
import recaptcha = require('recaptcha-promise');
|
||||
import User, { IUser, validateUsername, validatePassword, pack } from '../models/user';
|
||||
import generateUserToken from '../common/generate-native-user-token';
|
||||
@@ -119,6 +120,7 @@ export default async (req: express.Request, res: express.Response) => {
|
||||
username: username,
|
||||
username_lower: username.toLowerCase(),
|
||||
account: {
|
||||
keypair: generateKeypair(),
|
||||
token: secret,
|
||||
email: null,
|
||||
links: null,
|
||||
|
Reference in New Issue
Block a user