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

Add refresh in the jwt extension #5187

Closed
1 task
jannyHou opened this issue Apr 21, 2020 · 6 comments
Closed
1 task

Add refresh in the jwt extension #5187

jannyHou opened this issue Apr 21, 2020 · 6 comments

Comments

@jannyHou
Copy link
Contributor

Suggestion

Based on the comment from @mschnee in #5046 (comment).

Add token refresh functionality in the jwt auth extension https://github.com/strongloop/loopback-next/tree/master/extensions/authentication-jwt

There is a demo PR for token refresh in loopbackio/loopback4-example-shopping#537, and the token service interface has revokeToken function added in https://github.com/strongloop/loopback-next/pull/4746/files.

Use Cases

TBD

I may need more time to create the use case and example, cc @mschnee would you like to add your expected use cases here? Thank you!

Examples

TBD

Acceptance criteria

  • Add refresh function in the jwt strategy and corresponding tests.
@dhmlau
Copy link
Member

dhmlau commented May 19, 2020

@madaky, per our discussion on Slack, seems like you'll try to work on that. Assigning this to you now. Thanks!

@madaky
Copy link
Contributor

madaky commented May 21, 2020

@dhmlau: I am on it

@madaky
Copy link
Contributor

madaky commented May 22, 2020

Proposed Use Case for Referesh Token: Any sugestion @jannyHou @deepakrkris @dhmlau @mschnee

proposerefresh

@jannyHou
Copy link
Contributor Author

cc @madaky There is some discussion in #4573, I need a bit more time to investigate, will get back to you asap

@madaky
Copy link
Contributor

madaky commented May 27, 2020

The discussion #4573 : pointing towards adding a method signature in Authentication Component.

For giving User choice between Choosing need for refresh token. I implemented two interceptors
`
@intercept('refresh-token-generate') //to generate refresh token

@intercept('refresh-token-grant') // to refresh token
`
Will finish and pull it later today

@dhmlau
Copy link
Member

dhmlau commented Aug 28, 2020

Closing as done as PR #5589 has landed.
Thanks @madaky and @jannyHou!

@dhmlau dhmlau closed this as completed Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants