-
Notifications
You must be signed in to change notification settings - Fork 45
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
Remove XOAUTH2 support #18
Comments
Funny though, I have seen multiple clients offering XOAUTH2 support but not OAUTHBEARER. But I generally support getting rid of XOAUTH2. |
@emersion Would you mind giving a sample of how to use OAUTHBEARER instead of XOAUTH2? I have something along the lines of this (taking out error checking for brevity)
Would it be a matter of just switching what I pass to
How about Sorry if it's a dumb question 😃 |
Quick update. Tested this with GMail and Outlook. My approach above works fine but Outlooks doesn't support OAUTHBEARER. Is it possible to have XOAUTH2 and OAUTHBEARER, even if a warning is presented when using XOAUTH2 as it being deprecated? |
Hmm, indeed, it sounds like Outlook supports XOAUTH2 but not OAUTHBEARER:
There's definitely an argument to be made to bring back XOAUTH2, since we still support the non-standard LOGIN mechanism. I'd still prefer not to have to maintain these. |
I'd be fine looking after XOATH2 given that outlook support for IMAP is something that I need. If it was possible thought I'd rather contribute to this repo than having my own fork. |
We discussed with @foxcpp on IRC and agreed that we'd prefer to remove all legacy mechanisms: LOGIN and XOAUTH2. It's not a lot of code to copy-paste into your own project if you really need them. |
Fair enough
|
@benjcal - did you get xoauth2 working for outlook with client secret? I am getting "AUTHENTICATION failed" with no much information. I tested "tenent id", "client id" and "client secret" with python library and it is working fine. But, not able to get it working using "go-sasl" & "go-imap" |
@sjawaji I got it working but I'm not using the latest code, I'm using one commit before they deleted XOAUTH2. One of the best ways to take a look at what is happening is to use The complicated part was not really getting xoauth2 working but to get the proper token with the correct scopes. There are the scopes that I'm using:
and to actually use xoauth2 this is what I used:
Hope this helps! |
@benjcal I have tried When I use the scopes you have suggested, I am getting the following error. Following is the scope using which I am able to generate token. I can authenticate via I don't want to use password based authentication. |
Make sure that the app (oauth client_id and client_secret) have access to request those scopes. You don’t just need any token, you need a token that can be used to connect to IMAP. So focus first in getting a token that can be used for IMAP. The scopes that I sent are the only one I was able to get working for IMAP and from my research graph I couldn’t use graph scopes for IMAP. I’m not sure I’d be of much help without seeing your specific use case and your oauth flow. But my guess is that your issue is with the token and not with xoauth2 |
XOAUTH2 is superseded by OAUTHBEARER. Gmail has switched to the new mechanism.
The text was updated successfully, but these errors were encountered: