Skip to content

Conversation

@beauraines
Copy link
Owner

@beauraines beauraines commented Aug 6, 2025

Resolves an issue where the login command would wait indefinitely or not at all for input while waiting for the user to authenticate with RTM before requesting the user token to save to the ~/.rtm.json file.

Resolves #68 #131

Many thanks to @Hostuu @dogmaticwonder @franciscof5 for letting me know this issue was affecting more than just Chromebook users and for patience while I resolve it!

Creates work around commands to generate an .rtm.json configuration file

For new users without a `.rtm.json` file, there is an issue preventing the CLI to wait for you to
authenticate to RTM in your browser before attempting to login with your token. As a work around,
you can run the following command from the projects root, once you clone this repo.

It is a two step process, to get a `frob` and authenticate with RTM and then the second step uses
the `frob` to request a token that gets saved to your `.rtm.json` file.

First,  run `node src/utils/login-workaround-step1.js` You will get an RTM login link and a frob to
use in the next command

```shell
Authenticate with RTM by opening the link in your web browser
https://www.rememberthemilk.com/services/auth/?api_key=cbc762cxxxxxccc4ee1f&perms=delete&frob=8fccccccccc3fbc1df9d5&api_sig=3becccccccccccc305db82b2a
Once you've authenticated, run the following command
node src/utils/login-workaround-step2.js  8f49634xxxxxxxxxxxxxxxfd03fbc1df9d5
Warning! This wil overwrite an existing ~/.rtm.json if you have one.
```

Then run the command it gives you `node src/utils/login-workaround-step2.js <frob>` and it will get
your auth token and save it to `~/.rtm.json`.

Change the permissions on your `~/.rtm.json` to owner ownly `chmod 600`

With an `~/.rtm.json` you should now be able to use RTM CLI.
Creates new instance of readline to wait for the user to authenticate. I guess the completions were getting in the way or something.
This was linked to issues Aug 6, 2025
@beauraines
Copy link
Owner Author

@Hostuu @dogmaticwonder @franciscof5

This is the PR to try with the rtm login command.

if you're running it from the repo directly, you can run src/cli.js login

This should create a new (overwriting any existing ~/.rtm.json)

If this works, I'll update the description and pull out the workaround.

@Hostuu
Copy link

Hostuu commented Aug 7, 2025

I don't know how to use the workaround. It's giving me 'MODULE_NOT_FOUND' on the first command.

@Hostuu
Copy link

Hostuu commented Aug 7, 2025

I don't know how to use the workaround. It's giving me 'MODULE_NOT_FOUND' on the first command.

Nevermind, I just needed to download the raw files and put them in the appropriate locations

@beauraines
Copy link
Owner Author

You might have needed to run npm i after cloning the repo... BUT

  1. were you able to get an .rtm.json created in your home directory?
  2. with the changes I made, did the login command work when you don't have an .rtm.json ? Again, would have to npm i and then src/cli.js login

Are you able to use rtm-cli?

@Hostuu
Copy link

Hostuu commented Aug 8, 2025

  1. The .rtm.json already existed, but not in my home -- rather, it existed in the node directory of rtm-cli. I think the dysfunctional login command already created the file without filling it out with my account
  2. The changes worked smoothly

@beauraines
Copy link
Owner Author

@Hostuu Thanks for testing it and the update. I'll back out the workaround command then, since the login appears to be working. Once I do that I'll publish a new version to NPM, and then you can install from there and not have to do any of it from the cloned project.

I probably won't be able to get to that until Saturday morning, but it's on my to-do list 🐄

@beauraines beauraines self-assigned this Aug 8, 2025
Beau Raines added 3 commits August 10, 2025 08:22
@beauraines beauraines merged commit 7a308d4 into main Aug 10, 2025
2 checks passed
@beauraines beauraines deleted the login-workaround branch August 10, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dont save login session login command doesn't work on chromebook

3 participants