File tree Expand file tree Collapse file tree
src/controllers/authStrategies Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,22 +48,21 @@ export class EuropeanBrandAuthStrategy implements AuthStrategy {
4848 } ) ;
4949
5050 const authUrl = `${ this . environment . idpUrl } /auth/api/v2/user/oauth2/authorize` ;
51- const params = {
51+ await got ( authUrl , {
5252 response_type : 'code' ,
5353 client_id : serviceId ,
54- redirect_uri : this . environment . endpoints . redirectUri , // `${this.environment.baseUrl}/api/v1/user/oauth2/redirect`,
54+ redirect_uri : this . environment . endpoints . redirectUri ,
5555 state : 'ccsp' ,
5656 lang : 'en'
57- } ;
58- await got ( authUrl , { params } ) ;
57+ } ) ;
5958
6059 const loginUrl = `${ this . environment . idpUrl } /auth/account/signin` ;
6160 const loginData = new URLSearchParams ( {
6261 username : user . username ,
6362 password : user . password ,
6463 encryptedPassword : 'false' ,
6564 remember_me : 'false' ,
66- redirect_uri : this . environment . endpoints . redirectUri , // `${this.environment.baseUrl}/api/v1/user/oauth2/redirect`,
65+ redirect_uri : this . environment . endpoints . redirectUri ,
6766 state : 'ccsp' ,
6867 client_id : this . environment . clientId
6968 } ) ;
@@ -87,7 +86,7 @@ export class EuropeanBrandAuthStrategy implements AuthStrategy {
8786 const code = parsedUrl . searchParams . get ( 'code' ) ;
8887
8988 if ( ! code ) {
90- throw new Error ( `@EuropeanBrandAuthStrategy.login: Cannot find the argument code in ${ body . redirectUrl } .` ) ;
89+ throw new Error ( `@EuropeanBrandAuthStrategy.login: Cannot find the argument code.` ) ;
9190 }
9291 return {
9392 code : code as Code ,
You can’t perform that action at this time.
0 commit comments