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

Customising token response #332

Closed
ICCanche opened this issue Mar 31, 2017 · 3 comments
Closed

Customising token response #332

ICCanche opened this issue Mar 31, 2017 · 3 comments

Comments

@ICCanche
Copy link

ICCanche commented Mar 31, 2017

I am working on an API at the moment and have hit a brick wall. I am using Passport with the 'Password' grant type.

I want to return the user's information with the access tokens, however, I am not sure how to.

Which class could I implement, edit or extend to get this.

I would like this to be returned:

{ "token_type": "Bearer", "expires_in": 31536000, "access_token": "lalalalalal", "refresh_token": "lalalallala", "user": { "username": "a username", "user_type": "admin" } }

I know this is not an issue, and sorry about that.

@deividaspetraitis
Copy link

deividaspetraitis commented Apr 5, 2017

I think you can achieve it by using my suggested solution: #289 (comment)

@ghunti
Copy link

ghunti commented May 4, 2017

@ICCanche I think this is being discussed here: #94

@themsaid
Copy link
Member

themsaid commented Jul 5, 2017

Closing for lack of activity, hope you got the help you needed :)

@themsaid themsaid closed this as completed Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants