Renamed scripts to .mjs to follow ES module convention.

This commit is contained in:
2026-01-30 23:16:22 +01:00
parent 0904c44f63
commit c733310d69
6 changed files with 0 additions and 0 deletions

21
bin/interactive-login.mjs Executable file
View File

@@ -0,0 +1,21 @@
import { loginInteractive } from "../src/auth.js";
import { config } from "../public-config.js";
const scopes = ["https://management.azure.com/.default"];
let token;
try {
token = await loginInteractive({
tenantId: config.tenantId,
clientId: config.clientId,
scopes,
});
} catch (e) {
console.error("Login failed:", e);
console.error(e.stack);
process.exit(1);
}
console.log("Access token acquired:");
//console.log(token.accessToken);