Comments (3)
This just started happening to me too. It was working fine in January, and little if anything changed, and now this error on this line:
let postal = Postal(configuration: .gmail(login: login, password: .accessToken(accessToken)))
Able to get accessToken just fine.
Tried different IMAP account. Tried previous working commits. Tried different Google app registration. Tried different Apple cert. Nothing worked.
from postal.
In my case, the root cause was something changing on my google cert side, and the gmail api scope wasn't part of that google cert anymore. Once the gmail api scope was added back, it worked. Adding the scope via google console web UI never made a difference. Only worked through their api client for changing scope:
func ensureGoogleScope(user: GIDGoogleUser?) {
let gmailScope = "https://mail.google.com/"
let grantedScopes = user?.grantedScopes
if grantedScopes == nil || !grantedScopes!.contains(gmailScope) {
// Request additional Drive scope.
let additionalScopes = [gmailScope]
GIDSignIn.sharedInstance.addScopes(additionalScopes, presenting: getRootViewController()) { user, error in
guard error == nil else { return }
guard let user = user else { return }
// Check if the user granted access to the scopes you requested.
print("granted scopes: \(String(describing: user.grantedScopes))")
}
}
}
from postal.
Suggestion for Postal:
Show the complete error text from google. That would have indicated the exact cause of "Authentication Failed", such as not having the correct scope, or whatever the issue is.
from postal.
Related Issues (20)
- Type of expression is ambiguous without more context.
- @import Postal not working
- App crash on iPhone but runs successfully in simulator HOT 1
- Memory leaks while fetching last 10 mails HOT 2
- :-1: linker command failed with exit code 1 (use -v to see invocation) HOT 2
- Clean up from Xcode 10.2 changes HOT 2
- English localization deprecation warning
- Body: nil HOT 3
- ConnectionLogType.dataReceived: 1 NO [AUTHENTICATIONFAILED] Authentication failed login(description: "Authentication failed") HOT 1
- Not seeing any text/html parts in fetched messages HOT 2
- 0.5.0 (release in Cocoapods) won't compile in Swift 5.1 HOT 2
- Carthage build error HOT 1
- How to get All Mails
- Commandline App | Postal library | postal.connect | I get nothing back (no error or else)
- Certificate error
- How to fetch email body HOT 1
- Can not build on MacBook Air M1 HOT 5
- Is support for push (IDLE) planned?
- Further development? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from postal.