Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(login) keep session living #444

Open
wants to merge 6 commits into
base: canary
Choose a base branch
from
Open

feature(login) keep session living #444

wants to merge 6 commits into from

Conversation

remicastaing
Copy link
Contributor

Session token is valid for 30 days and will be stored in browser's local storage until user logs out.

  • replace ngCookie by ngStorage
  • replace $cookie by $localStorage
  • add token duration parameter in config file
  • add role in signToken

@remicastaing
Copy link
Contributor Author

@DaftMonk, I understand why you said it didn't work for you. I didn't checked if my PR works for FB, G+ or Tw. I have found my mistake: auth.service.js sets a cookie...
I will come back with a new PR if this feature is yet needed.

kingcody and others added 5 commits September 10, 2014 21:26
…he admin page

Changes:
- use User.query() in admin.controller instead of $http
…ing uibootstrap

Changes: (only if ui-bootstrap is selected)
- add `client/components/modal` folder
- modal folder contains service, markup template, and stylesheet
- modal service is intended to be extended, comes with `Modal.confirm.delete()` method
- admin and main page will both use `Modal.confirm.delete()`

Todo:
- review code for cleanliness and correctness
- possibly extend the modal service to include a basic alert class?
- write test for `Modal` service?
Changes:
- Update jshint task in `Gruntfile.js` to include `serverTest`
- Add `server/.jshintrc-spec` that extends `server/.jshintrc` with spec globals
- Use `"latedef": "nofunc"` instead of `"latedef": true` in `server/.jshintrc`
- Add assertion for `jshint` task in generator tests for `defaultOptions`
- Fix pre exsisting lint errors in `server` and `client`
- Change `getEmail()` in `client/app/account/settings/settings.controller` to use `user` arg and not `$scope.user`

Closes #463, #486
This reverts commit ef06272.

Conflicts:
	app/templates/client/app/account(auth)/settings/settings.controller(coffee).coffee
	app/templates/client/app/account(auth)/settings/settings.controller(js).js
	app/templates/client/app/admin(auth)/admin(html).html
	app/templates/client/app/admin(auth)/admin(jade).jade
	app/templates/client/app/admin(auth)/admin.controller(coffee).coffee
	app/templates/client/app/admin(auth)/admin.controller(js).js
	app/templates/server/api/user(auth)/user.controller.js
	app/templates/server/api/user(auth)/user.model.js
	app/templates/server/auth(auth)/facebook(facebookAuth)/index.js
	app/templates/server/auth(auth)/facebook(facebookAuth)/passport.js
	app/templates/server/auth(auth)/google(googleAuth)/index.js
	app/templates/server/auth(auth)/google(googleAuth)/passport.js
	app/templates/server/config/_local.env.js
	app/templates/server/config/environment/index.js
@remicastaing
Copy link
Contributor Author

Now, tests are passing and localStorage works for local, FB, G+ and Tw.

Session token is valid for 30 days and will be stored in browser's local storage until user log out.

- replace ngCookie by ngStorage
- replace $cookie by $localStorage
- add token duration parameter in config file
- add role in signToken
@Awk34 Awk34 mentioned this pull request Jul 9, 2015
@Awk34 Awk34 added this to the 2.3.0 milestone Jul 16, 2015
@Climax777
Copy link

When can we expect this to be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants