Add keypair to local account
This commit is contained in:
parent
7b0f93464a
commit
001d5faac9
10 changed files with 146 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue