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

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. #828

Open
KSGuptha opened this issue Mar 11, 2024 · 1 comment
Labels
bug triage Issues that need to be triaged

Comments

@KSGuptha
Copy link

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 ]
@KSGuptha KSGuptha added bug triage Issues that need to be triaged labels Mar 11, 2024
@mingyokim
Copy link
Collaborator

AppAuth sdk should bypass or ignore SSL issue in iOS SwiftUI and should receive access token.

I am not sure if we agree with this statement. AppAuth relies on TLS protected channels (source) - we would recommend making sure the server you are using has a valid SSL certificate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues that need to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants