Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 4, 2025

The login command now opens a browser to Forma's login page instead of prompting for email in the terminal and making an API call.

Changes:

  • Opens https://client.joinforma.com/login?type=magic in user's default browser
  • Removed terminal email input and validation (promptForEmail, email regex)
  • Removed requestMagicLink() API call
  • Removed --email CLI option
  • Added instructional messages before browser launch
  • Preserves any existing stored email for backward compatibility

New flow:

// Before: Terminal prompts for email, sends API request
const email = opts.email ?? promptForEmail();
await requestMagicLink(email);
const { id, tk } = promptForEmailedMagicLink(email);

// After: Opens browser, user handles email entry there
console.log(chalk.cyan('\nWe will now open your browser to the Forma login page.'));
console.log('Please enter your email address there and request a magic link.');
console.log('Once you receive the magic link in your email, come back to this terminal and paste it below.\n');
await open('https://client.joinforma.com/login?type=magic');
const { id, tk } = promptForEmailedMagicLink();

User still pastes the received magic link into the terminal as before.

Dependencies:

  • Added open@^10.2.0 for browser automation
Original prompt

Update the login command so that instead of collecting a user's email and pinging it to Forma yo get a magic link, it pops open a browser to https://client.joinforma.com/login?type=magic to enter the email and request the link. The flow afterwards where the user pastes the magic link into the terminal should be the same. Before popping open the browser, explain what is going to happen and that they need to enter their email, get the magic link, and then come back to the terminal to paste.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 4, 2025 10:29
- Add 'open' package dependency to open URLs in browser
- Remove email prompting and requestMagicLink API call
- Open browser to https://client.joinforma.com/login?type=magic
- Add clear instructions before opening browser
- Keep existing magic link pasting flow intact

Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Preserve any previously stored email address when saving the new access token to avoid losing user data.

Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Copilot AI changed the title [WIP] Update login command to use browser for magic link Replace terminal email prompt with browser-based magic link flow Dec 4, 2025
Copilot AI requested a review from timrogers December 4, 2025 10:40
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.

2 participants