Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Commit

Permalink
fix: [app,server] fixed #194
Browse files Browse the repository at this point in the history
  • Loading branch information
bhrg3se committed Nov 27, 2020
1 parent 5ccc846 commit 99be3d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/utils/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export const iconName = (name) =>
'weibo',
'wordpress',
'youtube',
].includes(name.toLowerCase())
? name.toLowerCase()
].includes(name?.toLowerCase())
? name?.toLowerCase()
: 'lock';
5 changes: 5 additions & 0 deletions server/api/auth/hTfa.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,14 @@ func handleIntentResponse(req TfaRequest, user *models.User, deviceID, browserID
userWithPass, err := Store.GetLoginDetails(user.Email, "")
if err != nil {
logrus.Error(err)
return "failed", consts.REASON_USER_NOT_FOUND, "DashboardLogin", "", ""
}
resp := devices.EnrolDeviceFunc(*user)
resp.OrgName = userWithPass.OrgName
resp.Account = userWithPass.Email
if resp.Account == "" {
resp.Account = userWithPass.UserName
}
return "success", "", consts.AUTH_RESP_ENROL_DEVICE, "", resp
case consts.AUTH_REQ_CHANGE_PASS:
verifyToken := utils.GetRandomString(7)
Expand Down

0 comments on commit 99be3d7

Please sign in to comment.