Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AuthenticationStateMachine.swift to permit XOAUTH2 Gmail connections #729

Closed
wants to merge 1 commit into from

Conversation

stephengoodman
Copy link

@stephengoodman stephengoodman commented Feb 8, 2023

Permit connections via AUTH XOAUTH2 (for Gmail) by having the client continue on responses rather than throwing.

Motivation:

In the current version, after submitting a AUTHENTICATE XOAUTH2 command with an InitialResponse, the client will hang and never process its result nor continue. This change permits the client to process the response and continue with operations, which lets OAUTH connections to Gmail work.

Modifications:

I have proposed making the .untagged case follow the .tagged case, rather than .fatal etc.

Result:

This lets connections to Gmail imap work.

I would like to add that the motivation behind the current system is not completely understood by me and this proposed fix is no doubt not the only way to achieve a fix. I would like to draw attention to this issue (Gmail does not work with swift-nio-imap, as far as I could figure out), and provide one possible solution.

@stephengoodman stephengoodman changed the title Update AuthenticationStateMachine.swift to permit XOAUTH Update AuthenticationStateMachine.swift to permit XOAUTH2 Gmail connections Feb 8, 2023
@danieleggert
Copy link
Collaborator

@stephengoodman Is this something you could create a test case for? That’d be awesome.

@apple apple deleted a comment from swift-server-bot Feb 18, 2023
@apple apple deleted a comment from swift-server-bot Feb 18, 2023
@apple apple deleted a comment from swift-server-bot Feb 18, 2023
@Davidde94
Copy link
Collaborator

Hey @stephengoodman thanks for the patch! Would you be able to provide a little more information on how this works, could be a link to a webpage or something...?

@danieleggert
Copy link
Collaborator

Is this related to #555 ?

danieleggert added a commit that referenced this pull request Jun 27, 2023
@danieleggert
Copy link
Collaborator

Fixing this in #743.

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.

3 participants