Feathers: JWT refresh token when a call is triggered after the expiry

Created on 8 Apr 2017  路  5Comments  路  Source: feathersjs/feathers

Hi Guys,
Is there a way to refresh the featherjs JWT token from the client side automatically if it expires untill he is explicitly logged out.
For Example if a call is triggered form the client after the expiry of the token,will the client handle the reauthentication process and trigger the call once again ?

const errorHandler = error => {
  app.authenticate({
    strategy: 'local',
    email: '[email protected]',
    password: 'admin'
  }).then(response => {
    // You are now authenticated again
  });
};
// Handle when auth fails during a reconnect or a transport upgrade
app.on('reauthentication-error', errorHandler)

I don't want to store the credentials on the client side in order to reauthenticate....Is there something else that could be done ?

Most helpful comment

Waiting on this feature. would help a lot in the client side

All 5 comments

@daffl out of curiosity - any idea on the milestone when this would be implemented as i am able to see the notes in the feathers-authentication code...

... // create accessToken
// TODO (EK): Support refresh tokens
// TODO (EK): This should likely be a hook
// TODO (EK): This service can be datastore backed to support blacklists :)

The coming milestone. No timeline, yet.

Waiting on this feature. would help a lot in the client side

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue with a link to this issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arkenstan picture arkenstan  路  3Comments

intumwa picture intumwa  路  3Comments

stephane303 picture stephane303  路  3Comments

codeus-de picture codeus-de  路  4Comments

perminder-klair picture perminder-klair  路  3Comments