OAuth2 authorizationUrl with extra query parameters (should include double '?')

This commit is contained in:
AlexVangelov
2017-09-15 15:57:41 -04:00
parent c7cb902eee
commit 9b1a6141df
2 changed files with 41 additions and 1 deletions

View File

@@ -64,7 +64,8 @@ export default function authorize ( { auth, authActions, errActions, configs, au
}
}
let url = [schema.get("authorizationUrl"), query.join("&")].join("?")
let authorizationUrl = schema.get("authorizationUrl");
let url = [authorizationUrl, query.join("&")].join(authorizationUrl.indexOf('?') === -1 ? "?" : "&")
// pass action authorizeOauth2 and authentication data through window
// to authorize with oauth2