TW-4924: credential-based auth flow for IMAP, iCloud, Yahoo, and EWS providers#77
Merged
Merged
Conversation
…providers Extends nylas auth login from 2 providers (Google, Microsoft) to 6 by adding credential-based authentication via POST /v3/connect/custom for IMAP, iCloud, and Yahoo, plus OAuth support for Exchange on-premises (EWS). Layers changed: - domain: add ProviderEWS, ProviderICloud, ProviderYahoo constants - ports: add CreateCustomGrant to AuthClient interface - adapter: implement CreateCustomGrant on HTTPClient, MockClient, demo clients - service: add LoginWithCredentials (saves grant + persists default) - CLI: extend nylas auth login with per-provider credential prompts - init wizard: offer all 6 providers during nylas init setup - integration test: update error message assertion for new provider list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nylas auth loginfrom 2 providers to 6nylas initwizard now offers all 6 providers when connecting an email accountPOST /v3/connect/custom(same endpoint as Agent Accounts)Changes across 7 layers
provider.goProviderEWS,ProviderICloud,ProviderYahooauth.goCreateCustomGranttoAuthClientauth.go, mock/demo clientsCreateCustomGrantvia/v3/connect/customservice.goLoginWithCredentials(save grant + persist default)login.gowizard_helpers.gonylas initinbound_removed_test.goTest plan
go build ./...passesgo test ./internal/cli/setup/— 20 tests passTestCLI_AuthLoginRejectsInboxProviderupdated and passingnylas auth login --provider icloud→ prompts for email + app password → grant creatednylas auth login --provider yahoo→ prompts for email + app password → grant creatednylas auth login --provider imap→ prompts for all fields including port → grant creatednylas auth login --provider ews→ opens browser → OAuth flow completes