File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,9 @@ export const initAuth = function initAuth(options) {
174
174
commit ( `${ moduleName } /setAccessToken` , accessToken )
175
175
commit ( `${ moduleName } /setPayload` , payload )
176
176
if ( feathersClient ) {
177
- return feathersClient . passport . setJWT ( accessToken ) . then ( ( ) => payload )
177
+ return feathersClient . authentication
178
+ . setAccessToken ( accessToken )
179
+ . then ( ( ) => payload )
178
180
}
179
181
}
180
182
return Promise . resolve ( payload )
Original file line number Diff line number Diff line change @@ -60,16 +60,16 @@ describe('Utils', function() {
60
60
commit : store . commit ,
61
61
req,
62
62
moduleName : 'auth' ,
63
- cookieName : 'feathers-jwt'
63
+ cookieName : 'feathers-jwt' ,
64
+ feathersClient
64
65
} )
65
66
. then ( ( ) => {
66
67
assert (
67
68
store . state . auth . accessToken === accessToken ,
68
69
'the token was in place'
69
70
)
70
71
assert ( store . state . auth . payload , 'the payload was set' )
71
- // @ts -ignore
72
- return feathersClient . passport . getJWT ( )
72
+ return feathersClient . authentication . getAccessToken ( )
73
73
} )
74
74
. then ( token => {
75
75
assert . isDefined ( token , 'the feathers client storage was set' )
You can’t perform that action at this time.
0 commit comments