Commit Graph

44 Commits

Author SHA1 Message Date
OldHawk
52a31c164d user can reset their passkey now 2017-05-09 13:40:16 +08:00
OldHawk
1eda960103 save passkey when user used social accounts 2017-05-09 12:22:16 +08:00
OldHawk
9d74664f26 make passkey when user signup 2017-04-16 17:46:15 +08:00
Laurence Tennant
2b6cf53d30 fix(users): Better MIME-type checking, remove image cropping library (#1589)
* Cropping remove, nicer UI

* Fix MIME-type checking, add image upload tests

* Change image config settings to uploads.profile.image to build a more
rational structure for configuring other types of uploads
2016-11-15 15:59:47 -08:00
itelo
0e2ea65918 fix(users): fix redirect when signup or add provider (#1573)
Fixes the issue of the redirect after Social login authentication, on signup or user profile add provider.
2016-10-19 17:12:47 -07:00
Michael Leanos
0ea8cec120 fix(express): Incorrest uses of 400 error codes (#1553)
Fixes incorrest usage of 400 HTTP responses being returned from the
server, in favor of using 422.

Also, changed a few return codes to 401 where it was more appropriate.

See this article for reasoning behind moving to 422, and why 400 isn't
appropriate for these cases.

For ref:
6be12f8a06

Related:
https://github.com/meanjs/mean/pull/1547
https://github.com/meanjs/mean/pull/1510
2016-10-10 16:00:24 -07:00
itelo
4aa5d77251 feat(core): change console in angular to (#1551)
logs with $log in client idea proposed by @simison
also removed unnecessary consoles in users.password.server.controller.js

Fixes #1541
2016-10-08 21:43:27 -07:00
Michael Leanos
6be12f8a06 fix(core): Add custom 400 and 404 error messages (#1547)
* Added 400 and 404 custom error messages

* nicer error message views

* Sign Up & Sign In error responses

Changed the error responses returned from the Sign Up & Sign In API
calls to use 422 rather than 400.

For insight into why this change was made:
https://github.com/meanjs/mean/pull/1510#issuecomment-247435378

For reference on why to use 422 over 400:
https://www.bennadel.com/blog/2434-http-status-codes-for-invalid-data-400-vs-422.htm
2016-10-07 22:03:31 -07:00
Daron Jones
e3eafa6131 fix(users) Handle missing email - OAuth (#1501)
* fix(users) patch OAuth default email issue

- Intentionally omits setting email in constructor to trigger defaults when
creating user. Handles cases where email is not authorized/given by provider.

Related to issue #1250
2016-09-20 21:24:16 -07:00
Daron Jones
67d1a5a1f6 fix(authentication) Stops error on signin/signup (#1495)
Uses the passport info object to simplify login and remove the need to
temporarily cache the redirect within the session.
2016-09-11 12:29:05 -07:00
Liran Tal
cf246babd1 feat(config): adds a generic DOMAIN configuration environment (#1469)
Generic DOMAI configuration environment variable, useful for setting links to an app
in reset email templates, and other cases.

Fixes #871 and #847
2016-09-01 22:37:43 +03:00
Daron Jones
54ae7dc564 feat(users): prevent route leaking access token (#1417)
The test for authentication use a route /api/users/me. This should probably be upgraded to use
a proper passport mock.

In the meanwhile this should make the returned user object safer - using code from core.

Fixes n/a
2016-08-31 22:50:23 +03:00
shanavas
730cca76af fix(users): don't update secure profile fields (#1421)
* Fix(users): Don't update secure profile fields

Avoid updating secure fields as password, salt ..etc through
user profile update.

Fixes #1420

* Refactor variable name
2016-08-27 09:45:06 +03:00
aanev
234f0c6850 fix(user): fix changeProfilePicture to overwrite existing files
* fix(user): fix changeProfilePicture

* use promises to simplify callbacks

* use fs.unlink to delete old picture once the profile is updated

Fixes #1415

* fix(user): fix changeProfilePicture

* use promises to simplify callbacks

* use fs.unlink to delete old picture once the profile is updated

* log file errors to console

Fixes #1415

* fix(user): fix changeProfilePicture

* use promises to simplify callbacks

* use fs.unlink to delete old picture once the profile is updated

* log file errors to console

* update error handler module to handle file upload errors

Fixes #1415

* fix(user): fix changeProfilePicture

* use promises to simplify callbacks

* use fs.unlink to delete old picture once the profile is updated

* log file errors to console

* update error handler module to handle file upload errors

Fixes #1415
2016-08-26 10:10:02 +03:00
Liran Tal
c95bd7d1cb fix(core): fix ESLint console warnings, Twitter redirect, and and scope usage (#1388)
* Use validator.js instead of regexp for validations in User Schema.

* Disables "Unexpected console statement  no-console" warnings

* Fixes redirection to wrong URL after login with social networks.

* Use ViewModel vm instead of $scope in manage social accounts controller.

* preserving the option to redirect to a specific URL as done in saveOAuthUserProfile() (thanks to @OneOfTheWorld for pointing out)
2016-07-07 01:24:23 +03:00
Jonathan Trowbridge
2ad422ca9b fix(users): fix for users.profile.server.controller.js security (#1338)
* Fix for users.profile.server.controller.js security (#1338)

Fixes an issue where if req.body._id was not set to the current user it
could potentially log the current user in as another user.

Don't use req.body._id when editing user

Prevents a user from being logged in as another if edit user form _id is
not their own.

Fixes #1338
2016-06-18 18:12:08 +03:00
Marek Grzybek
d14d5130af feat(config): Deprecate JSHint in favor of ESLint
Add basic ESLint setup extending well-known Airbnb code style.

Fixes #1072, #1097
2016-03-15 19:11:12 +01:00
Liran Tal
0ebbdd4935 Merge pull request #1236 from lirantal/bugfix/ignored_errors_on_controller
fix(users) error objects were not handled
2016-02-28 09:58:20 +02:00
Liran Tal
03043dcc90 fix(users): removing unused variable from code 2016-02-27 12:58:46 +02:00
Liran Tal
8e249548d4 fix(users): error objects were not handled 2016-02-27 12:54:54 +02:00
Sébastien Combéfis
d2b2dfd606 fix(docs): Fix comments content and style
Changed some bad comments referencing the Articles module in other modules.
Typo fixed in xxx.client.modules.js files ("Application" => "Applicaion")
Full stop character removed at the end of line comments
2016-01-17 11:46:11 +01:00
Faraj Farook
f9c7403825 fix(users): Removing redundant variables
Removing redundant variables defined and not used
2016-01-16 16:17:07 +05:30
gustavodemari
7ecf9337ce updating profile upload with a new version of multer 2015-10-18 20:56:12 -02:00
Liran Tal
b824ebce97 fixed bug #923 - making password reset links work for both http and https configuration 2015-09-19 11:00:47 +03:00
almegdad
aafa5e69cf Force Lowercase & Remove Sensitive Data
* add directive to force username & email lowercase
* remove sensitive data in password reset
* 2 space indentation  in reset & forgot password views
2015-09-01 21:09:20 +03:00
Andrew Throener
d319f9203f Initial commit to return /client to the URL include paths
Conflict Resolve

Fixed Karma testing

Added back cacheIDFromPath as I am not sure what that does.  Just removed the replaceing of /client
2015-08-13 11:07:02 -05:00
Ryan Hutchison
cb9d7e3db6 fix indentation 2015-08-11 01:01:12 -04:00
Ryan Hutchison
ef3a3f9548 formatting reboot (space-2 and consistency)
JSCS fixes

update editorconfig
2015-07-31 10:04:02 -04:00
Igor Freire
e6a35a7f9a Enable redirection to previous page after login
Two different strategies are adopted, one for when the user authenticates locally and the other through providers. When authenticating locally, the signin function in the client controller redirects to the previous state (storing and using a state name) after successful login. When authenticating through a provider, the first call to provider stores the previous URL (not state, URL) in the session. Then, when provider actually calls the authentication callback, session redirect_to path is used for redirecting user.
2015-07-29 10:55:47 -03:00
Ryan Hutchison
839f805172 BUG: fix admin access (blocking user PUT) 2015-07-28 18:50:11 -04:00
Ryan Hutchison
60660204ac Admin module base & user admin implementation.
update displayName

implements #700 (client-side role security) on angular routes.
2015-07-24 20:03:35 -04:00
Liran Tal
de3b890f9d removed /#! in user controllers
Resolved 0.4.0 related conflicts:
	modules/users/server/controllers/users/users.authentication.server.controller.js
2015-07-25 00:39:28 +03:00
Igor Freire
5d4d7cecfe Make emails unique
Emails are made unique. When user attempts to sign in through a provider in which his email is one that is already registered, user is redirected to the signin page with an error passed as a query string parameter.
2015-07-17 14:52:27 -03:00
Ryan Hutchison
786c546d84 Update users.authentication.server.controller.js 2015-07-09 15:44:38 -04:00
Ryan Hutchison
b18a7dda99 bug: remove social account. 2015-07-09 13:49:48 -04:00
Liran Tal
67e96a4f22 0.4.0 branch merged into master 2015-07-02 12:08:09 +03:00
Mikael Korpela
10d35d1df9 Fix deprecated ExpressJS req.param('provider')
>"Deprecated. Use either req.params, req.body or req.query, as applicable."
http://expressjs.com/api.html#req.param
2015-06-02 15:36:56 +03:00
Mikael Korpela
fcb6f90293 Remove un-used hasAuthorization and requiresLogin
Looks like these aren't needed now that we have ACL.
2015-05-29 00:36:07 +03:00
Veikko Karsikko
c800c0a18f Hide email address and remove trailing whitespaces
Email address should not be shown to client
2015-05-07 14:26:17 +03:00
Pedro Rodrigues
b2d76b82e5 Remove more unused requires 2015-04-23 17:51:58 +01:00
Edward Sun
0dbab180a9 Removed duplicate include for crypto 2015-04-13 12:08:30 -04:00
Christian Berendt
e027f4025b Add missing newline at the end of text files
On Unix it is common to have a newline at the end of text files.
2015-02-16 21:39:55 +01:00
Christian Berendt
4879a8ea2a Remove executable bit when not necessary
The executable bit is set for a lot of files where it is not necessary
to have the executable bit set. This PR removes the executable bit from
those files.
2015-02-16 14:19:56 +01:00
Amos Haviv
ab81d61bd3 New 0.4 version 2014-11-10 23:12:33 +02:00