Skip to content

Commit 3c7f6b4

Browse files
authored
Merge pull request #75 from reynaldichernando/browser-login
Add browser based login
2 parents da58ee6 + eee5498 commit 3c7f6b4

File tree

5 files changed

+359
-205
lines changed

5 files changed

+359
-205
lines changed

bin/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@ async function main() {
2626
program
2727
.command('login')
2828
.description('Login to Puter account')
29-
.option('-s, --save', 'Save authentication token in .env file', '')
30-
.action(async () => {
31-
await login();
29+
.option('-s, --save', 'Save authentication token in .env file')
30+
.option('--web', 'Use browser-based login (default)')
31+
.option('--with-credentials', 'Use username/password login')
32+
.option('--host <url>', 'Puter host URL', 'https://puter.com')
33+
.action(async (options) => {
34+
await login(options);
3235
process.exit(0);
3336
});
3437

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"author": "Ibrahim.H",
2727
"license": "MIT",
2828
"dependencies": {
29-
"@heyputer/puter.js": "^2.1.2",
29+
"@heyputer/puter.js": "^2.2.8",
3030
"chalk": "^5.3.0",
3131
"cli-table3": "^0.6.5",
3232
"commander": "^13.0.0",

0 commit comments

Comments
 (0)