File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ export class Auth {
319319 : endpoint
320320
321321 // Fix baseURL for relative endpoints
322- if ( isRelativeURL ( _endpoint . url ) ) {
322+ if ( _endpoint . baseURL === '' ) {
323323 _endpoint . baseURL = requrl ( this . ctx . req )
324324 }
325325
Original file line number Diff line number Diff line change @@ -76,8 +76,12 @@ export function laravelPassport(
7676 scheme : 'refresh' ,
7777 endpoints : {
7878 token : url + '/oauth/token' ,
79- login : { } ,
80- refresh : { } ,
79+ login : {
80+ baseURL : ''
81+ } ,
82+ refresh : {
83+ baseURL : ''
84+ } ,
8185 logout : false ,
8286 user : {
8387 url : url + '/api/auth/user'
Original file line number Diff line number Diff line change @@ -384,6 +384,7 @@ export class Oauth2Scheme<
384384 const response = await this . $auth . request ( {
385385 method : 'post' ,
386386 url : this . options . endpoints . token ,
387+ baseURL : '' ,
387388 data : encodeQuery ( {
388389 code : parsedQuery . code as string ,
389390 client_id : this . options . clientId + '' ,
@@ -448,6 +449,7 @@ export class Oauth2Scheme<
448449 . request ( {
449450 method : 'post' ,
450451 url : this . options . endpoints . token ,
452+ baseURL : '' ,
451453 headers : {
452454 'Content-Type' : 'application/x-www-form-urlencoded'
453455 } ,
You can’t perform that action at this time.
0 commit comments