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

WIP: Gentle re-authentication modal/popup. #560

Closed
wants to merge 2 commits into from
Closed

Conversation

tech4him1
Copy link
Contributor

@tech4him1 tech4him1 commented Aug 28, 2017

- Summary

We need to have a way to gently re-authenticate the user, especially for backends for which the OAuth token times out or is otherwise invalidated.

With this implementation, we don't re-run the user's action at all, we just re-authenticate on API failure. For example, if the user is saving a post and we get a 401, we re-authenticate the user, but then they have to click the "Save" button again. Do you guys think that is clear enough?

This is not currently implemented at all, but it is needed (will be used) by both #517 and #525.

#559 needs merged before this can be finished. Done
We can also use the Dialog from #554 for this as well. Done
This PR fixes #569. No longer applicable.

- Test plan:

Current authentication works correctly.

- Description for the changelog

Add gentle re-auth modal for backends (not currently implemented).

- A picture of a cute animal (not mandatory but encouraged)

@tech4him1 tech4him1 self-assigned this Aug 29, 2017
@tech4him1 tech4him1 requested a review from erquhart August 29, 2017 21:31
@tech4him1 tech4him1 requested review from Benaiah and removed request for erquhart October 30, 2017 15:05
@tech4him1 tech4him1 requested a review from erquhart November 19, 2017 15:13
@tech4him1 tech4him1 force-pushed the gentle-reauth branch 4 times, most recently from 86978e4 to 3d8f54c Compare November 21, 2017 03:37
@tech4him1 tech4him1 removed their assignment Nov 21, 2017
@tech4him1 tech4him1 changed the title WIP: Gentle re-authentication modal/popup. Gentle re-authentication modal/popup. Nov 21, 2017
@erquhart
Copy link
Contributor

erquhart commented Dec 9, 2017

@tech4him1 thought this was WIP for some reason, will review next week. In the meantime, can you rebase? Some guy pushed a bunch of changes and broke everything 😛

@verythorough
Copy link
Contributor

verythorough commented Dec 11, 2017

Deploy preview ready!

Built with commit 1607dd3

https://deploy-preview-560--netlify-cms-www.netlify.com

@verythorough
Copy link
Contributor

verythorough commented Dec 11, 2017

Deploy preview ready!

Built with commit 1607dd3

https://deploy-preview-560--cms-demo.netlify.com

@tech4him1 tech4him1 force-pushed the gentle-reauth branch 3 times, most recently from 9937289 to 8f69f0e Compare December 12, 2017 02:33
@tech4him1 tech4him1 changed the title Gentle re-authentication modal/popup. WIP: Gentle re-authentication modal/popup. Dec 12, 2017
We were clearing out any old user state when sending an authentication
request (or failure), which makes sense, but we have to keep the old
user object while re-authenticating or it will ruin our app's current
state.  This doesn't change our current (initial) auth at all.
@tech4him1 tech4him1 changed the title WIP: Gentle re-authentication modal/popup. Gentle re-authentication modal/popup. Dec 20, 2017
@erquhart
Copy link
Contributor

@tech4him1 I thought I remembered there being complications with this, but not seeing any mention in the PR. Can you confirm one last time whether this is ready for review?

@tech4him1
Copy link
Contributor Author

@erquhart This was originally intended for GitHub, because it seemed that the token was sometimes being timing out if you logged out of GitHub.com in a different tab. That couldn't be consistently reproduced, however (and shouldn't logically be happening), so the PR was put on hold. We did decide to leave it open for use in any other new backend that may have token timeouts, such as BitBucket (and likely GitLab).

@tech4him1 tech4him1 changed the title Gentle re-authentication modal/popup. WIP: Gentle re-authentication modal/popup. Apr 18, 2018
@erquhart
Copy link
Contributor

@tech4him1 thoughts on this one?

@tech4him1
Copy link
Contributor Author

@erquhart The current use for this would be adding implicit authentication for BitBucket. We could just close the PR and reference it from the issue if you want?

@tech4him1 tech4him1 closed this Aug 5, 2018
@tech4him1 tech4him1 deleted the gentle-reauth branch August 5, 2018 22:46
@erquhart
Copy link
Contributor

Awesome, thanks @tech4him1

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

Successfully merging this pull request may close these issues.

Re-Auth Error Messages for GitHub
3 participants