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

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

Merged
merged 1 commit into from
Jul 23, 2019

Conversation

ashumilova
Copy link
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 self-assigned this Jul 22, 2019
@@ -68,7 +68,8 @@ export class CheKeycloak {
}

logout(): void {
window.sessionStorage.setItem('oidcDashboardRedirectUrl', location.href);
window.sessionStorage.removeItem('githubToken');
window.sessionStorage.setItem('oidcDashboardRedirectUrl', location.href);
Copy link
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
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
Copy link
Contributor

rhopp commented Jul 23, 2019

ci-test

@che-bot
Copy link
Contributor

che-bot commented Jul 23, 2019

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