add user account email verificiation (#977)
authorJosh Morel <morel.josh@hotmail.com>
Fri, 31 Aug 2018 07:18:19 +0000 (03:18 -0400)
committerChocobozzz <me@florianbigard.com>
Fri, 31 Aug 2018 07:18:19 +0000 (09:18 +0200)
commitd9eaee3939bf2e93e5d775d32bce77842201faba
treec115acb3611986b98f51b3addf29ebe66f63ee7f
parent04291e1ba44032165388758e993d385a10c1c5a1
add user account email verificiation (#977)

* add user account email verificiation

includes server and client code to:

* enable verificationRequired via custom config
* send verification email with registration
* ask for verification email
* verify via email
* prevent login if not verified and required
* conditional client links to ask for new verification email

* allow login for verified=null

these are users created when verification not required
should still be able to login when verification is enabled

* refactor email verifcation pr

* change naming from verified to emailVerified
* change naming from askVerifyEmail to askSendVerifyEmail
* undo unrelated automatic prettier formatting on api/config
* use redirectService for home
* remove redundant success notification on email verified

* revert test.yaml smpt host
42 files changed:
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
client/src/app/+verify-account/index.ts [new file with mode: 0644]
client/src/app/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.html [new file with mode: 0644]
client/src/app/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.scss [new file with mode: 0644]
client/src/app/+verify-account/verify-account-ask-send-email/verify-account-ask-send-email.component.ts [new file with mode: 0644]
client/src/app/+verify-account/verify-account-email/verify-account-email.component.html [new file with mode: 0644]
client/src/app/+verify-account/verify-account-email/verify-account-email.component.ts [new file with mode: 0644]
client/src/app/+verify-account/verify-account-routing.module.ts [new file with mode: 0644]
client/src/app/+verify-account/verify-account.module.ts [new file with mode: 0644]
client/src/app/app-routing.module.ts
client/src/app/core/server/server.service.ts
client/src/app/login/login.component.html
client/src/app/shared/users/user.service.ts
client/src/app/signup/signup.component.ts
config/default.yaml
config/production.yaml.example
config/test.yaml
server/controllers/api/config.ts
server/controllers/api/users/index.ts
server/helpers/audit-logger.ts
server/helpers/custom-validators/users.ts
server/initializers/checker.ts
server/initializers/constants.ts
server/initializers/installer.ts
server/initializers/migrations/0265-user-email-verified.ts [new file with mode: 0644]
server/lib/emailer.ts
server/lib/oauth-model.ts
server/lib/redis.ts
server/middlewares/validators/users.ts
server/models/account/user.ts
server/tests/api/check-params/config.ts
server/tests/api/check-params/users.ts
server/tests/api/server/config.ts
server/tests/api/server/email.ts
server/tests/api/users/index.ts
server/tests/api/users/users-verification.ts [new file with mode: 0644]
server/tests/api/users/users.ts
server/tests/utils/server/config.ts
server/tests/utils/users/users.ts
shared/models/server/custom-config.model.ts
shared/models/server/server-config.model.ts