Skip to content

Conversation

leakymemory
Copy link
Contributor

Fixes #296

The details in each commit describe the fixes more completely, but in general, the O365 errors were not being shown because the updateReason property was not being set in the returning error object. Because of this, the logic around when to show the message to the user was broken.

I also made a related UI fix and updated the string to include the live.com domain as a needed exception.

When I was playing around with the third-party cookie settings in Firefox,
it looked like live.com was set as an exception by default, so I decided
to take it out of the original error message about cookies being disabled.
But, it seems that cookies are only allowed on the sign in endpoint.  For
whatever reason, if you don't have the live.com domain added as an
exception, you are unable to sign out of the clipper.

So, I've added back in the need to add live.com to the list of exceptions.
When I was doing the cleanup for the third-party cookie message, it looks
like I accidentally left the error description in both places.
In order to know if we should show the error description when sign in
errors occur, we were counting on the updateReason property being set on
the returning object. This was true until my last change, where we always
return a valid UserInfo (except in this one case). After my change, the
updateReason property was getting blown away and because of that, the
logic around when to show the error message could never be true.
@VishaalK
Copy link
Contributor

VishaalK commented Jan 11, 2017

After cleaning up the if (!updatedUser) {...} logic it looks good to go!

Should have done this at the beginning. The previous version is a little
too hard to read.
@VishaalK
Copy link
Contributor

LGTM

@mttwc
Copy link
Contributor

mttwc commented Jan 11, 2017

Looks good!

@leakymemory leakymemory merged commit 792aa81 into master Jan 11, 2017
@leakymemory leakymemory deleted the bug/o365-sign-in-errors branch January 11, 2017 20:58
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

Successfully merging this pull request may close these issues.

No longer showing O365 sign-in errors
3 participants