@@ -437,7 +437,8 @@ export class AuthController extends BaseController {
437437 login (
438438 strategy : string ,
439439 credentials : JSONObject ,
440- expiresIn ?: string | number
440+ expiresIn ?: string | number ,
441+ options : ArgsAuthControllerLogin = { }
441442 ) : Promise < string > {
442443 const request = {
443444 action : "login" ,
@@ -448,7 +449,7 @@ export class AuthController extends BaseController {
448449 } ;
449450
450451 this . kuzzle . emit ( "beforeLogin" ) ;
451- return this . query ( request , { queuable : false , timeout : - 1 , verb : "POST" } )
452+ return this . query ( request , { queuable : false , timeout : - 1 , verb : "POST" , ... options } )
452453 . then ( ( response ) => {
453454 if ( this . kuzzle . cookieAuthentication ) {
454455 if ( response . result . jwt ) {
@@ -497,13 +498,14 @@ export class AuthController extends BaseController {
497498 *
498499 * @see https://docs.kuzzle.io/sdk/js/7/controllers/auth/logout
499500 */
500- async logout ( ) : Promise < void > {
501+ async logout ( options : ArgsAuthControllerLogin = { } ) : Promise < void > {
501502 this . kuzzle . emit ( "beforeLogout" ) ;
502503 try {
503504 await this . query (
504505 {
505506 action : "logout" ,
506507 cookieAuth : this . kuzzle . cookieAuthentication ,
508+ ...options
507509 } ,
508510 { queuable : false , timeout : - 1 }
509511 ) ;
@@ -700,6 +702,10 @@ export type ArgsAuthControllerUpdateSelf = ArgsDefault;
700702
701703export type ArgsAuthControllerValidateMyCredentials = ArgsDefault ;
702704
705+ export type ArgsAuthControllerLogin = ArgsDefault ;
706+
707+ export type ArgsAuthControllerLogout = ArgsDefault ;
708+
703709export interface ArgsAuthControllerRefreshToken extends ArgsDefault {
704710 expiresIn ?: number | string ;
705711}
0 commit comments