修改通用登录接口的email登录
This commit is contained in:
parent
5ee74c8a38
commit
515d151455
@ -8,7 +8,8 @@ API_TOKEN_EXPIRESIN=1d
|
|||||||
GOOGLE_OAUTH_CLIENT="53206975661-asnf3qe4bg29p8h981pgf099osvrjbme.apps.googleusercontent.com"
|
GOOGLE_OAUTH_CLIENT="53206975661-asnf3qe4bg29p8h981pgf099osvrjbme.apps.googleusercontent.com"
|
||||||
GOOGLE_OAUTH_CLIENT2="53206975661-ih3r0ubph3rqejdq97b029difbrk2bqj.apps.googleusercontent.com"
|
GOOGLE_OAUTH_CLIENT2="53206975661-ih3r0ubph3rqejdq97b029difbrk2bqj.apps.googleusercontent.com"
|
||||||
GOOGLE_OAUTH_CLIENT_IOS="53206975661-qan0rnefniegjv53ohild375pv0p7ekd.apps.googleusercontent.com"
|
GOOGLE_OAUTH_CLIENT_IOS="53206975661-qan0rnefniegjv53ohild375pv0p7ekd.apps.googleusercontent.com"
|
||||||
DB_MAIN=mongodb://188.88.0.2/wallet-development
|
# DB_MAIN=mongodb://188.88.0.2/wallet-development
|
||||||
|
DB_MAIN=mongodb://192.168.100.22/wallet-development
|
||||||
|
|
||||||
EMAIL_VERIFY_URL="https://wallet.cebggame.com"
|
EMAIL_VERIFY_URL="https://wallet.cebggame.com"
|
||||||
EMAIL_SERVER='http://127.0.0.1:3087'
|
EMAIL_SERVER='http://127.0.0.1:3087'
|
||||||
|
@ -3,6 +3,8 @@ import logger from 'logger/logger'
|
|||||||
import { Account } from 'modules/Account'
|
import { Account } from 'modules/Account'
|
||||||
import { CodeRecord, CodeStatus, CodeType, DEFAULT_CODE, DEFAULT_EXPIRE_TIME } from 'modules/CodeRecord'
|
import { CodeRecord, CodeStatus, CodeType, DEFAULT_CODE, DEFAULT_EXPIRE_TIME } from 'modules/CodeRecord'
|
||||||
import {
|
import {
|
||||||
|
DEFAULT_LOGIN_MAIL_HTML,
|
||||||
|
DEFAULT_LOGIN_MAIL_SUBJECT,
|
||||||
DEFAULT_REGIST_HTML,
|
DEFAULT_REGIST_HTML,
|
||||||
DEFAULT_REGIST_SUBJECT,
|
DEFAULT_REGIST_SUBJECT,
|
||||||
DEFAULT_RESET_HTML,
|
DEFAULT_RESET_HTML,
|
||||||
@ -154,6 +156,12 @@ class MailController extends BaseController {
|
|||||||
case CodeType.VERIFY:
|
case CodeType.VERIFY:
|
||||||
html = DEFAULT_VERIFY_MAIL_HTML
|
html = DEFAULT_VERIFY_MAIL_HTML
|
||||||
subject = DEFAULT_VERIFY_MAIL_SUBJECT
|
subject = DEFAULT_VERIFY_MAIL_SUBJECT
|
||||||
|
case CodeType.LOGIN:
|
||||||
|
html = DEFAULT_LOGIN_MAIL_HTML
|
||||||
|
subject = DEFAULT_LOGIN_MAIL_SUBJECT
|
||||||
|
}
|
||||||
|
if (!html || !subject) {
|
||||||
|
throw new ZError(15, 'type error')
|
||||||
}
|
}
|
||||||
|
|
||||||
subject = record.code + ' ' + subject
|
subject = record.code + ' ' + subject
|
||||||
|
@ -38,7 +38,7 @@ export class PlatEmail implements IPlat {
|
|||||||
throw new ZError(14, 'code error')
|
throw new ZError(14, 'code error')
|
||||||
}
|
}
|
||||||
const openId = sha1(email)
|
const openId = sha1(email)
|
||||||
let data: any = { email, emailVerified: true }
|
let data: any = { email, emailReal: email, emailVerified: true }
|
||||||
const { api_platform } = req.headers
|
const { api_platform } = req.headers
|
||||||
if (api_platform) {
|
if (api_platform) {
|
||||||
data.platform = api_platform
|
data.platform = api_platform
|
||||||
|
Loading…
x
Reference in New Issue
Block a user