Skip to content
Discussion options

You must be logged in to vote

I did try using this Bun / TS script and it seems to work as intended. I haven't had time to try out the Ansible setup.

import { env } from "bun";

const server = env.SERVER ?? "http://localhost:8090";
const userEmail = env.EMAIL ?? "user@example.com";
const userPassword = env.PASSWORD ?? "password";
const authToken = env.AUTH_TOKEN ?? await getHubAuthToken(userEmail, userPassword);

// may or may not be enabled
await getUniversalToken(authToken).then(console.log);

// make sure it's enabled
await enableUniversalToken(authToken).then(console.log);

// should be enabled now
await getUniversalToken(authToken).then(console.log);

// get user auth token
async function getHubAuthToken(userEmail: 

Replies: 2 comments 17 replies

Comment options

You must be logged in to vote
16 replies
@dbrennand
Comment options

@henrygd
Comment options

@jstet
Comment options

@henrygd
Comment options

Answer selected by dbrennand
@jstet
Comment options

@henrygd
Comment options

@dbrennand
Comment options

@dbrennand
Comment options

Comment options

You must be logged in to vote
1 reply
@henrygd
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants