iZettle / sdk-ios

Add card payments from Zettle to your own app
https://developer.zettle.com/docs/ios-sdk
Other
82 stars 38 forks source link

Be able to force login and password #66

Closed gigeos closed 8 years ago

gigeos commented 8 years ago

Hi guys! We need to prevent users to login because all of them use same account, so email and password have to be setted. Is it possible to have that?

Thanks!

mansbernhardt commented 8 years ago

Hi,

You can only force to use a certain user, but we won't allow you to handle iZettle users passwords. From the docs:

Enforced User Account

By setting the shared instance property enforcedUserAccount to an iZettle username, subsequent operations will be restricted to only be performed on that account. If the set enforced user account was not previosuly logged in, an iZettle login prompt will be presented with a readonly email field prefilled with the enforced user account. If the enforced user account was already logged in (even though another account has been used in between), the account will be switched to use the enforced user account account instead.

If enforcedUserAccount is set to nil, any iZettle account can be used, and the email field will be editable.

Enforced user account can be changed between operations to allow switching between different users for different operations. This is useful for integrators supporting multiple accounts.

Preferably integrating apps will provide a settings page where the user can enter their iZettle account (used to set the enforced user account).

gigeos commented 8 years ago

Thank you for your answer! Yes I use enforcedUserAccount for the moment but is it possible to add a method to your SDK to set email and password ?

mansbernhardt commented 8 years ago

We have not current plan (and the SDK would probably never allow) the third party integrator handle iZettle passwords. We might in the future allow you to login to e.g. a web site and provide a authentication token or something similar that you could pass to the SDK.

gigeos commented 8 years ago

Ok thanks for your answer!