diff --git a/ui/src/app/affiliation/affiliations.component.html b/ui/src/app/affiliation/affiliations.component.html index c2e988281..58be543d5 100644 --- a/ui/src/app/affiliation/affiliations.component.html +++ b/ui/src/app/affiliation/affiliations.component.html @@ -158,8 +158,8 @@

https://{{ orcidBaseUrl }}/{{ affiliation.orcidId }}{{ orcidBaseUrl }}/{{ affiliation.orcidId }} diff --git a/ui/src/app/app.constants.ts b/ui/src/app/app.constants.ts index 924c6d581..b9510acca 100644 --- a/ui/src/app/app.constants.ts +++ b/ui/src/app/app.constants.ts @@ -41,7 +41,7 @@ export function emailValidator(control: FormControl): { [key: string]: any } | n return null } const environment = window.location.hostname.replace('member-portal.', '').replace('.orcid.org', '') -export const ORCID_BASE_URL = environment + '.orcid.org' +export const ORCID_BASE_URL = 'https://' + environment + '.orcid.org' // eslint-disable-next-line export const EMAIL_REGEXP = /^([^@\s]|(".+"))+@([^@\s\."'\(\)\[\]\{\}\\/,:;]+\.)+([^@\s\."'\(\)\[\]\{\}\\/,:;]{2,})+$/ diff --git a/ui/src/app/landing-page/landing-page.component.spec.ts b/ui/src/app/landing-page/landing-page.component.spec.ts index 42e67adaa..11e501696 100644 --- a/ui/src/app/landing-page/landing-page.component.spec.ts +++ b/ui/src/app/landing-page/landing-page.component.spec.ts @@ -55,7 +55,7 @@ describe('LandingPageComponent', () => { component.processRequest('someState', '', '') expect(landingPageService.getOrcidConnectionRecord).toHaveBeenCalled() expect(component.oauthUrl).toBe( - 'localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState' + 'https://localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState' ) expect(landingPageService.getPublicKey).toHaveBeenCalledTimes(0) expect(windowLocationService.updateWindowLocation).toHaveBeenCalled() @@ -72,7 +72,7 @@ describe('LandingPageComponent', () => { component.processRequest('someState', '', '') expect(landingPageService.getOrcidConnectionRecord).toHaveBeenCalled() expect(component.oauthUrl).toBe( - 'localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState' + 'https://localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState' ) expect(landingPageService.getPublicKey).toHaveBeenCalledTimes(0) expect(windowLocationService.updateWindowLocation).toHaveBeenCalledTimes(0) @@ -92,7 +92,7 @@ describe('LandingPageComponent', () => { component.processRequest('someState', '', '') expect(landingPageService.getOrcidConnectionRecord).toHaveBeenCalled() expect(component.oauthUrl).toBe( - 'localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState' + 'https://localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState' ) expect(landingPageService.getPublicKey).toHaveBeenCalledTimes(0) expect(windowLocationService.updateWindowLocation).toHaveBeenCalledTimes(0)