mirror of
https://github.com/github/codeql-action.git
synced 2025-12-31 03:30:14 +08:00
19 lines
576 B
JavaScript
19 lines
576 B
JavaScript
import * as OAuthMethods from "@octokit/oauth-methods";
|
|
function getWebFlowAuthorizationUrlWithState(state, options) {
|
|
const optionsWithDefaults = {
|
|
clientId: state.clientId,
|
|
request: state.octokit.request,
|
|
...options,
|
|
allowSignup: state.allowSignup ?? options.allowSignup,
|
|
redirectUrl: options.redirectUrl ?? state.redirectUrl,
|
|
scopes: options.scopes ?? state.defaultScopes
|
|
};
|
|
return OAuthMethods.getWebFlowAuthorizationUrl({
|
|
clientType: state.clientType,
|
|
...optionsWithDefaults
|
|
});
|
|
}
|
|
export {
|
|
getWebFlowAuthorizationUrlWithState
|
|
};
|