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

Issue with Login via iOS SDK in Test Environment (presentLogin failing) #163

Open
FelixRolland opened this issue Feb 11, 2025 · 8 comments

Comments

@FelixRolland
Copy link

Description:

I am encountering an issue with the SumUp iOS SDK (v6.0.0) while attempting to log in using the presentLogin() method in the test environment.

The login fails with the following output:
success: false
error: nil

Additionally, I receive the following error message in the UI:
"Server error. Something went wrong! Please try again."

Steps to Reproduce:

  1. Set up the SumUp iOS SDK in the app using the method:

SumUpSDK.setup(withAPIKey: "sup_afk_...")

  1. Call the presentLogin method when the user clicks a login button:

SumUpSDK.presentLogin(from: viewController, animated: true) { success, error in print("Did present login with success: \(success). Error: \(String(describing: error))") }

  1. Attempt to log in with a valid test account.

What I’ve Checked:

Test API Key: The correct test API key is being used in SumUpSDK.setup().
Bundle ID: The app’s Bundle ID matches the one configured in the SumUp Developer Portal.
Test Account: I can log in successfully using the test account on the SumUp test web portal.
Required Permissions: The following keys are added to the app’s Info.plist:
NSLocationWhenInUseUsageDescription,
NSBluetoothAlwaysUsageDescription

Additional Observations:

  • In the Developer Portal, the test API and affiliate keys keep loading indefinitely in test mode. However, when switching to live mode, the keys are displayed without issue.

  • The integration checks SumUpSDK.testIntegration() pass without issues in the debug environment.

Environment:

  • SDK Version: 6.0.0
  • iOS Version on Test Device: 16.7
  • Deployment Target: 15.2
  • Device: Physical iPad 2017
  • Xcode Version: 16.2
  • Swift Version: 5
@salmansumup
Copy link

Hi Felix,

It seems like you are using Affiliate key instead of API key to login. Please follow attached document to generate API key and try again.

Instructions to generate API key.pdf

@FelixRolland
Copy link
Author

Hi,

I replaced the affiliate key with the secret API key.

Here’s where I stand now:

I am able to log in successfully with my test account credentials in the SumUp portal.
However, I still cannot log in via the app using the presentLogin method in the SDK.
I receive the following error message:

"Server error. These login details are not valid. Please check your username and password and try again."
Additionally, I’ve noticed the following:

Is there a difference between the secret API key shown in test mode and the one used in the live environment?
When I switch to Test Mode in the SumUp Developer Portal (switch) and go to the API Keys section, the keys don’t load properly; the page keeps spinning indefinitely.
Could this issue be related to my inability to retrieve the test secret API key, or is there something else I need to check?

Thanks in advance for your support!

@salmansumup
Copy link

salmansumup commented Feb 12, 2025 via email

@FelixRolland
Copy link
Author

Hi,

I am confident that I’m using the correct test account credentials, as they work successfully in the SumUp portal (Test Mode). However, I am unsure if I am using the correct API key.

When I toggle to Test Mode in the Developer Portal and go to the API Keys section, the keys do not load, and the spinner keeps spinning indefinitely. Should there be a separate secret API key specifically for Test Mode? If so, I currently cannot retrieve it due to this issue in the portal.

@salmansumup
Copy link

salmansumup commented Feb 12, 2025 via email

@FelixRolland
Copy link
Author

hi,

the email adress is hidden.

@salmansumup
Copy link

Its visible now.

@FelixRolland
Copy link
Author

Thank you for your support! I’ve sent an email with a screen recording of the issue and will await further updates.

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

2 participants