feathersjs-ecosystem / authentication-client

[MOVED] The authentication client
https://github.com/feathersjs/feathers
MIT License
41 stars 19 forks source link

Expired token does not throw appropriate error #95

Closed EirikFA closed 5 years ago

EirikFA commented 6 years ago

Steps to reproduce

Simply set up a simple Feathers application with authentication using JWT and set the expiresIn option to something like 15s. Then login using your preferred strategy and call authenticate() on a simple Feathers client. Wait for the TokenExpiredError in the server log and call authenticate() again (depends on your client setup, I just reload the page when using Vue and it attempts to authenticate).

Expected behavior

The call to authenticate with an expired token should throw an error saying something about the token having expired.

Actual behavior

The call to authenticate throws a "normal" not-authenticated with no mention of the token having expired.

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):

Server

@feathersjs/socketio: 3.2.0 @feathersjs/feathers: 3.1.3 @feathersjs/authentication: 2.1.2 @feathersjs/authentication-jwt: 2.0.0

Client

@feathersjs/authentication-client: 1.0.2 @feathersjs/feathers: 3.1.4

NodeJS version: 9.10.1

Operating System: Windows 10 Subsystem for Linux Ubuntu Bash

daffl commented 5 years ago

Client side JWT validation and parsing should no longer be necessary in Feathers v4 authentication. Please see the migration guide for more information. Closing this issue in order to archive this repository. Related issues can be opened at the new code location in the Feathers main repository.