[ENG-10702] Update connectOrcid to properly logging user out#934
Merged
futa-ikeda merged 1 commit intoCenterForOpenScience:feature/orcid-integrationfrom Apr 3, 2026
Merged
Conversation
nsemets
approved these changes
Apr 3, 2026
6b5bf7e
into
CenterForOpenScience:feature/orcid-integration
3 checks passed
cslzchen
reviewed
Apr 3, 2026
Comment on lines
-88
to
+90
| const logoutUrl = new URL(`${webUrl}/logout/`); | ||
| logoutUrl.searchParams.set('next', casLoginUrl.toString()); | ||
| window.location.href = logoutUrl.toString(); | ||
| this.authService.logout(casLoginUrl.toString()); |
Contributor
There was a problem hiding this comment.
Nice fix. Just make sure that I understand: this.authService.logout() log user out of angular, BE and CAS?
- log out of angular FE session
- log our of BE session
- the BE logout process in 2 automatically handle CAS logout too
cslzchen
reviewed
Apr 3, 2026
| if (isPlatformBrowser(this.platformId)) { | ||
| this.cookieService.deleteAll(); | ||
| window.location.href = `${this.webUrl}/logout/?next=${encodeURIComponent('/')}`; | ||
| window.location.href = `${this.webUrl}/logout/?next=${encodeURIComponent(nextUrl || '/')}`; |
Contributor
There was a problem hiding this comment.
Oh, I missed this. The BE logout endpoint will redirect to CAS logout endpoint automatically, so this should work and answers my previous question.
futa-ikeda
added a commit
that referenced
this pull request
Apr 8, 2026
* feat(profile-settings): Add query-param to specify a tab (#906) * [ENG-10584][ENG-10585] Allow users to disconnect existing orcid in social tab (#912) * feat(settings): Allow users to disconnect orcid in social tab * feat(settings): Add dummy connect button when no orcid is associated with user * chore(settings): move authenticated identity to own component * refactor(settings): Implement CR suggestions; Update tests * refactor(settings): Update authenticated identity test * refactor(settings): Update authenticated identity test to use OSFTestingModule * feat(settings): Allow user to connect ORCID in profile settings page (#918) * [ENG-10684] Update Authenticated Identity section (#924) * feat(settings): update authenticated identity section * style(settings): Update styles * refactor(settings): Update Authenticated Identity section * chore(settings): Update Authenticated identity section language (#930) * fix(settings): Update connectOrcid to properly logging user out (#934)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Summary of Changes
AuthService.logoutto specifynextquery-paramScreenshot(s)
Side Effects
QA Notes