UNPKG

@dataroadinc/setup-auth

Version:

CLI tool and programmatic API for automated OAuth setup across cloud platforms

18 lines (17 loc) 791 B
export async function addCommandUpdateRedirectUrls(program) { program .command("update-redirect-urls") .description("Update OAuth redirect URLs for a deployment") .option("--callback-path <path>", "Custom callback path") .option("-u, --url <url>", "Deployment URL to add to redirect URIs") .action(async function _action() { const options = this.optsWithGlobals(); const oauthProvider = options.oauthProvider; const platform = options.platform; const deploymentUrl = options.deploymentUrl || process.env.VERCEL_URL; console.log(`Updating ${oauthProvider} redirect URLs for ${platform} platform`); if (deploymentUrl) { console.log(`Deployment URL: ${deploymentUrl}`); } }); }