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

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. #106 #197

Open
suleymanbasbug opened this issue Sep 5, 2023 · 6 comments

Comments

@suleymanbasbug
Copy link

I am trying to do this but get error (IOS 14.2):

The certificate for this server is invalid. You might be connecting to a server that is pretending to be “https://...” which could put your confidential information at risk.

I copied the .cer certificate into xcode and do this:

const response = await fetch(url, {
        method: 'GET',
        sslPinning: {
          certs: ['my_cer_file_without_extension'], // your certificates name (without extension)
        },
        headers: {
          Accept: 'application/json; charset=utf-8',
          'Access-Control-Allow-Origin': '*',
          e_platform: 'mobile',
        },
      });

Am I doing something wrong or is it no longer working? Any ideas?

@idrakimuhamad
Copy link

Is your cert a self signed?

@suleymanbasbug
Copy link
Author

Is your cert a self signed?

Yes

@idrakimuhamad
Copy link

Is your cert a self signed?

Yes

Yeah won't work AFAIK. Unless you patch the package code to accept invalid cert.

@Aeners
Copy link

Aeners commented Jan 5, 2024

@suleymanbasbug
Hey have you find a way to solve this issue, I'm struggling on it too

@suleymanbasbug
Copy link
Author

@Aeners
Hey, man. I stopped using this package. We implemented it natively.

@hasil-cstack
Copy link

@suleymanbasbug Can you please share you native implementation to us. It can be in form of a blog.

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

No branches or pull requests

4 participants