Skip to content

TW-4923: nylas init auto-prompts auth login when no grants exist#76

Merged
qasim-nylas merged 1 commit into
mainfrom
feature/TW-4923-init-auto-auth-login
May 11, 2026
Merged

TW-4923: nylas init auto-prompts auth login when no grants exist#76
qasim-nylas merged 1 commit into
mainfrom
feature/TW-4923-init-auto-auth-login

Conversation

@qasim-nylas
Copy link
Copy Markdown
Collaborator

Summary

  • When nylas init Step 4 finds no existing grants, the wizard now offers to connect a Google or Microsoft email account inline via OAuth instead of printing a static "run nylas auth login" message
  • On decline, shows the manual command; on error, falls back gracefully
  • Added injectable promptAuthLoginFn for testability (matches existing stepGrantSyncFn pattern)

Test plan

  • go build ./... passes
  • go test ./internal/cli/setup/ — all 20 tests pass (4 new)
  • Manual: nylas init on fresh account → prompted to connect email → OAuth completes → grant saved
  • Manual: declined prompt → shows "nylas auth login" hint
  • Manual: OAuth timeout/error → graceful fallback message

Instead of printing a static "run nylas auth login" message, the init
wizard now offers to connect a Google or Microsoft email account inline
when Step 4 finds no existing grants. On decline it shows the manual
command; on error it falls back gracefully.
@qasim-nylas qasim-nylas requested a review from AaronDDM May 11, 2026 23:27
Copy link
Copy Markdown
Collaborator

@AaronDDM AaronDDM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@qasim-nylas qasim-nylas merged commit 7aea05f into main May 11, 2026
6 checks passed
@qasim-nylas qasim-nylas deleted the feature/TW-4923-init-auto-auth-login branch May 11, 2026 23:30
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