Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
54cb9ec
fix(ENG-10262): fixed login url encoding
ihorsokhanexoft Feb 17, 2026
ef75a2e
fix(ENG-10262): unified encoding of login
ihorsokhanexoft Feb 17, 2026
f3707fa
Merge pull request #886 from ihorsokhanexoft/fix/ENG-10262-2
nsemets Feb 18, 2026
a4a50c2
fix(ENG-10288): Update logout url
Vlad0n20 Feb 19, 2026
f0bb29b
fix(ENG-10288): Update logout url
Vlad0n20 Feb 23, 2026
8464901
Merge pull request #890 from Vlad0n20/fix/ENG-10288
cslzchen Feb 24, 2026
da9a502
feat(institutions): Add sso_availability attribute to Institution mod…
Ostap-Zherebetskyi Mar 30, 2026
fdac31c
Merge pull request #919 from Ostap-Zherebetskyi/feature/institutions_…
cslzchen Mar 30, 2026
369e3ad
Merge branch 'develop' into feature/merge_develop
Ostap-Zherebetskyi Mar 30, 2026
2856eec
Merge pull request #926 from Ostap-Zherebetskyi/feature/merge_develop
cslzchen Mar 30, 2026
db8bdad
refactor(auth): simplify login url construction and remove helper
Ostap-Zherebetskyi Apr 2, 2026
d0a0185
Merge pull request #931 from Ostap-Zherebetskyi/fix/login_redirect
cslzchen Apr 2, 2026
6de5450
Merge remote-tracking branch 'upstream/develop' into osf4i-in-progres…
Ostap-Zherebetskyi Apr 15, 2026
95b7983
Merge pull request #948 from Ostap-Zherebetskyi/osf4i-in-progress-sso…
cslzchen Apr 16, 2026
9e3cdb3
Merge remote-tracking branch 'upstream/develop' into osf4i-in-progres…
Ostap-Zherebetskyi Apr 16, 2026
edf7bec
feat(osf4i-in-progress-sso): fix institution unit tests
Ostap-Zherebetskyi Apr 16, 2026
782ef5a
Merge pull request #954 from Ostap-Zherebetskyi/osf4i-in-progress-sso…
cslzchen Apr 16, 2026
91b2d00
Merge remote-tracking branch 'upstream/develop' into feature/osf4i-in…
cslzchen Apr 20, 2026
8f20ab9
fix(auth): update logout redirect url to ensure proper navigation
Ostap-Zherebetskyi Apr 22, 2026
3bdc5c6
Merge pull request #965 from Ostap-Zherebetskyi/fix/logout_redirect
cslzchen Apr 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/app/core/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,14 @@ export class AuthService {
}

this.loaderService.show();
const loginUrl = `${this.casUrl}/login?${urlParam({ service: `${this.webUrl}/login`, next: window.location.href })}`;
window.location.href = loginUrl;

const serviceUrl = new URL(`${this.webUrl}/login`);
serviceUrl.searchParams.set('next', window.location.href);

const loginUrl = new URL(`${this.casUrl}/login`);
loginUrl.searchParams.set('service', serviceUrl.toString());

window.location.href = loginUrl.toString();
}

navigateToOrcidSignIn(): void {
Expand Down Expand Up @@ -79,7 +85,7 @@ export class AuthService {

if (isPlatformBrowser(this.platformId)) {
this.cookieService.deleteAll();
window.location.href = `${this.webUrl}/logout/?next=${encodeURIComponent(nextUrl || '/')}`;
window.location.href = `${this.webUrl}/logout/?next=${encodeURIComponent(nextUrl || `${window.location.origin}/`)}`;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('ProfileInformationComponent', () => {
},
institutionalRequestAccessEnabled: true,
logoPath: 'logo.png',
sso_availability: 'Public',
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ describe('AddComponentDialogComponent', () => {
assets: { logo: '', logo_rounded: '', banner: '' },
institutionalRequestAccessEnabled: false,
logoPath: '',
sso_availability: 'Public',
},
{
id: 'inst-2',
Expand All @@ -76,6 +77,7 @@ describe('AddComponentDialogComponent', () => {
assets: { logo: '', logo_rounded: '', banner: '' },
institutionalRequestAccessEnabled: false,
logoPath: '',
sso_availability: 'Public',
},
];

Expand All @@ -91,6 +93,7 @@ describe('AddComponentDialogComponent', () => {
assets: { logo: '', logo_rounded: '', banner: '' },
institutionalRequestAccessEnabled: false,
logoPath: '',
sso_availability: 'Public',
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ describe('AffiliatedInstitutionSelectComponent', () => {
},
institutionalRequestAccessEnabled: false,
logoPath: '/logos/unavailable.png',
sso_availability: 'Unavailable',
};

fixture.componentRef.setInput('institutions', mockInstitutions);
Expand Down Expand Up @@ -134,6 +135,7 @@ describe('AffiliatedInstitutionSelectComponent', () => {
},
institutionalRequestAccessEnabled: false,
logoPath: '/logos/unavailable.png',
sso_availability: 'Unavailable',
};

fixture.componentRef.setInput('institutions', mockInstitutions);
Expand Down Expand Up @@ -181,6 +183,7 @@ describe('AffiliatedInstitutionSelectComponent', () => {
},
institutionalRequestAccessEnabled: false,
logoPath: '/logos/unavailable.png',
sso_availability: 'Unavailable',
};

fixture.componentRef.setInput('institutions', mockInstitutions);
Expand Down
1 change: 1 addition & 0 deletions src/app/shared/mappers/institutions/institutions.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class InstitutionsMapper {
logoPath: data.attributes.logo_path,
userMetricsUrl: data.relationships?.user_metrics?.links?.related?.href,
linkToExternalReportsArchive: data.attributes.link_to_external_reports_archive,
sso_availability: data.attributes.sso_availability,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ interface InstitutionAttributesJsonApi {
institutional_request_access_enabled: boolean;
logo_path: string;
link_to_external_reports_archive: string;
sso_availability: string;
}

interface InstitutionLinksJsonApi {
Expand Down
1 change: 1 addition & 0 deletions src/app/shared/models/institutions/institutions.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface Institution {
logoPath: string;
userMetricsUrl?: string;
linkToExternalReportsArchive?: string;
sso_availability: string;
}

export interface InstitutionAssets {
Expand Down
1 change: 1 addition & 0 deletions src/testing/mocks/institution.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export const MOCK_INSTITUTION = {
},
institutionalRequestAccessEnabled: true,
logoPath: 'https://mockinstitution.org/logo.png',
sso_availability: 'Public',
};
Loading