Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Include data into JWT response #47

Closed
lfernando-silva opened this issue Nov 18, 2017 · 2 comments
Closed

Include data into JWT response #47

lfernando-silva opened this issue Nov 18, 2017 · 2 comments

Comments

@lfernando-silva
Copy link

lfernando-silva commented Nov 18, 2017

How can I insert some more information into JWT response? For example, include the name and email of logged user, just to show it in a fixed bar, avoiding to make a new request on the frontend just to take it. And on JWT decode, to obtain something like:

{
  "userId": 2,
 "name": "john",
 "loginUser":"johndoe42",
  "iat": 1511030741,
  "exp": 1511117141,
  "aud": "0.0.0.0",
  "iss": "feathers",
  "sub": "anonymous"
}
@daffl
Copy link
Member

daffl commented Nov 18, 2017

See https://docs.feathersjs.com/guides/auth/recipe.customize-jwt-payload.html

@lfernando-silva
Copy link
Author

Works nice. Thanks

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

No branches or pull requests

2 participants