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

Token creation has side effect #454

Closed
whollacsek opened this Issue Mar 21, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@whollacsek
Copy link
Contributor

whollacsek commented Mar 21, 2017

With an auth config such as:

{
  "auth": {
    "secret": "...",
    "jwt": {
      "issuer": "...",
      "audience": "...",
      "expiresIn": "7d"
    }
  }
}

Calling only once app.service('/authentication').create({payload: {userId: _id}, jwt: {expiresIn: '10m'}}) internally will produce a side effect which is that subsequent create call (such as the app.authenticate() sent by the feathers-client) will generate tokens with 10m expiration instead of 7d.

Modules:

    "feathers": "^2.0.3",
    "feathers-authentication": "pre",
    "feathers-authentication-jwt": "^0.3.1",
    "feathers-configuration": "^0.4.1",
    "feathers-errors": "^2.5.0",
    "feathers-hooks": "^1.7.1",
    "feathers-hooks-common": "^3.0.0-pre.1",
    "feathers-legacy-authentication-hooks": "^1.0.0",
    "feathers-mongoose": "^5.0.3",
    "feathers-rest": "^1.6.0",

whollacsek added a commit to whollacsek/feathers-authentication that referenced this issue Mar 21, 2017

ekryski added a commit that referenced this issue Mar 22, 2017

@ekryski

This comment has been minimized.

Copy link
Member

ekryski commented Mar 22, 2017

Closed via #456. Will comment again when it is released.

@ekryski ekryski closed this Mar 22, 2017

@whollacsek

This comment has been minimized.

Copy link
Contributor Author

whollacsek commented Mar 22, 2017

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.