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

Observe auth state #443

Closed
anarenteriareyes opened this issue Nov 24, 2023 · 6 comments
Closed

Observe auth state #443

anarenteriareyes opened this issue Nov 24, 2023 · 6 comments

Comments

@anarenteriareyes
Copy link

Hi!

I'm integrating the iOS SDK into my app, and I noticed that for the Android SDK there is a way to observe the authentication status. Is there something similar in the iOS SDK, or maybe just a way to know if the user is authenticated?

@nataliq-pp
Copy link
Contributor

nataliq-pp commented Nov 24, 2023

Hi @anarenteriareyes, thank you for bringing up this API discrepancy with our Android SDK! There's currently no such functionality in the iOS SDK. We’re aware of the issue and appreciate your reminder. Please keep an eye out for updates, and we’ll make sure to notify you once it’s resolved.

@fobos531
Copy link

fobos531 commented Jan 4, 2024

Hello @nataliq-pp , we would also very much appreciate to have this in the SDK.

@nataliq-pp
Copy link
Contributor

Hi @anarenteriareyes & @fobos531, we are currently refining some improvements to the iOS SDK. Can you help us understand your use cases with the requested functionality? We have a few differences between iOS and Android in terms of authentication flows and your feedback can be a valuable input for our prioritization.

@fobos531
Copy link

Hi @anarenteriareyes & @fobos531, we are currently refining some improvements to the iOS SDK. Can you help us understand your use cases with the requested functionality? We have a few differences between iOS and Android in terms of authentication flows and your feedback can be a valuable input for our prioritization.

Hello @nataliq-pp

In our app we have a "control panel" kind of screen where the user can verify that they have all the prerequisites needed to collect payments. This can be things like ensuring all relevant permissions are granted (location, storage etc.). In this kind of case we would like to have the ability to check if the user is already logged into Zettle or not, and based on that show a button to log in.

Additionally, it would help us prevent errors in developer code when we mistakenly try to initialize the SDK multiple times. Right now, if you try to initialize the SDK multiple times, it will throw an exception and crash an app, which is not a great user experience. Relying on the "logged in" variable exported from Zettle SDK would allow us to handle this much more gracefully.

@Bart-Westenenk
Copy link

What is the state of this issue? @nataliq-pp

@nataliq-pp
Copy link
Contributor

Linking related issue #466 which we will keep open until we have an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants