Skip to content

Store github token in session storage, remove on logout - #13947

Merged
ashumilova merged 1 commit into
masterfrom
fix_github_token
Jul 23, 2019
Merged

Store github token in session storage, remove on logout#13947
ashumilova merged 1 commit into
masterfrom
fix_github_token

Conversation

@ashumilova

Copy link
Copy Markdown
Contributor

Signed-off-by: Anna Shumilova ashumilo@redhat.com

What does this PR do?

Avoids saving GitHub token in Local Storage, stores it in Session Storage instead + removes it on logout.
Token will be lost:

  • on logout,
  • on closing the tab/browser window.
    Token is not available on another opened tab, but on page refresh - it keeps stored.

What issues does this PR fix or reference?

#13694

@ashumilova ashumilova added kind/bug Outline of a bug - must adhere to the bug report template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. target/che7GA labels Jul 22, 2019
@ashumilova ashumilova added this to the 7.0.0 milestone Jul 22, 2019
@ashumilova
ashumilova requested review from akurinnoy and benoitf July 22, 2019 11:41
@ashumilova ashumilova self-assigned this Jul 22, 2019
logout(): void {
window.sessionStorage.setItem('oidcDashboardRedirectUrl', location.href);
window.sessionStorage.removeItem('githubToken');
window.sessionStorage.setItem('oidcDashboardRedirectUrl', location.href);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong indent ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, fixed

Signed-off-by: Anna Shumilova <ashumilo@redhat.com>
@rhopp

rhopp commented Jul 23, 2019

Copy link
Copy Markdown
Contributor

ci-test

@che-bot

che-bot commented Jul 23, 2019

Copy link
Copy Markdown
Contributor

Results of automated E2E tests of Eclipse Che Multiuser on OCP:
Build details
Test report
docker image: eclipseche/che-server:13947
https://github.com/orgs/eclipse/teams/eclipse-che-qa please check this report.

@ashumilova
ashumilova merged commit f6b7d35 into master Jul 23, 2019
@ashumilova
ashumilova deleted the fix_github_token branch July 23, 2019 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Outline of a bug - must adhere to the bug report template. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants