NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be which could put your confidential information at risk.
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 2k
- Forks
- 867
- Avg merge
- 4d 48m
- Merged PRs (30d)
- 1
Description
Describe the bug
The certificate for this server is invalid. You might be connecting to a server that is pretending to be which could put your confidential information at risk.
Server does not have fully trusted SSL. How to bypass or ignore ssl error for AppAUth sdk in SwiftUI.
I have tried this
OIDURLSessionProvider.setSession(URLSession(configuration: .default, delegate: self, delegateQueue: nil))
but receiving
Token exchange error: Issued at time is more than 600 seconds before or after the current time
How to resolve this issue?
Code
OIDAuthorizationService.perform(tokenExchangeRequest) { [self] response, error in
if let tokenResponse = response {
print("Received token response with accessToken: (tokenResponse.accessToken ?? "DEFAULT_TOKEN")")
} else {
print("Token exchange error: (error?.localizedDescription ?? "DEFAULT_ERROR")")
}
self.authState!.update(with: response, error: error)
}
Expected behavior
AppAuth sdk should bypass or ignore SSL issue in iOS SwiftUI and should receive access token.
Environment
- Device: [ e.g. iPhone 13,etc ]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with OIDURLSessionProvider.setSession and the OIDAuthorizationService.perform token-exchange call shown in the report. Reproduce the certificate and issued-at errors separately, then determine whether the SDK supports the requested certificate behavior and what verified configuration resolves the token exchange failure; done means a documented, reproducible diagnosis.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- authentication, mobile, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100