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

Don't throw for logged out users #104

Open
vasklund opened this issue Nov 5, 2018 · 2 comments
Open

Don't throw for logged out users #104

vasklund opened this issue Nov 5, 2018 · 2 comments

Comments

@vasklund
Copy link
Contributor

vasklund commented Nov 5, 2018

This is a suggestion to not throw an error when calling Identity.hasSession() in a browser without an active session (user is logged out). For example this makes it harder to distinguish real errors in the Identity.on('error', callback) function.

Compare with for example the browser fetch API: https://developer.mozilla.org/en-US/docs/Web/API/Response, where only network errors are thrown as "real errors", and everything else is successful but together with a statusCode.

Suggestion from SvD 😃

@torarvid
Copy link
Contributor

torarvid commented Nov 5, 2018

Hi. Just wanted to mention that this sounds like a breaking change, and if implemented, would probably have to wait for version 4.0.0.

@vasklund
Copy link
Contributor Author

vasklund commented Nov 5, 2018

Sounds reasonable :)

We've had some issues implementing the JS SDK, mostly coming down to unexpected behavior (like this or #72) or missing/confusing documentation (like the fact the redirect URLs in SelfService also double as a CORS domain whitelist). So this is just us trying to help you help us, so to speak 😄

We only use and see parts of your APIs so of course you'll know best what makes sense short-term vs long-term 👍

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