diff --git a/dmp-frontend/src/app/ui/auth/login/b2access/b2access-login.component.ts b/dmp-frontend/src/app/ui/auth/login/b2access/b2access-login.component.ts index 32a1cba27..a0c38b6ec 100644 --- a/dmp-frontend/src/app/ui/auth/login/b2access/b2access-login.component.ts +++ b/dmp-frontend/src/app/ui/auth/login/b2access/b2access-login.component.ts @@ -36,7 +36,11 @@ export class B2AccessLoginComponent extends BaseComponent implements OnInit { } public b2AccessGetAuthCode() { - window.location.href = environment.loginProviders.b2accessConfiguration.oauthUrl + '?response_type=code&client_id=' + environment.loginProviders.b2accessConfiguration.clientId + '&redirect_uri=' + environment.loginProviders.b2accessConfiguration.redirectUri + '&state=987654321&scope=USER_PROFILE'; + window.location.href = environment.loginProviders.b2accessConfiguration.oauthUrl + + '?response_type=code&client_id=' + environment.loginProviders.b2accessConfiguration.clientId + + '&redirect_uri=' + environment.loginProviders.b2accessConfiguration.redirectUri + + '&state=' + environment.loginProviders.b2accessConfiguration.state + + '&scope=USER_PROFILE'; } public b2AccessLogin(code: String) { diff --git a/dmp-frontend/src/environments/environment.prod.ts b/dmp-frontend/src/environments/environment.prod.ts index 4c0a6861a..601551986 100644 --- a/dmp-frontend/src/environments/environment.prod.ts +++ b/dmp-frontend/src/environments/environment.prod.ts @@ -24,7 +24,8 @@ export const environment = { b2accessConfiguration: { clientId: '', oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz', - redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access' + redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access', + state: '' }, orcidConfiguration: { clientId: 'APP-766DI5LP8T75FC4R', diff --git a/dmp-frontend/src/environments/environment.staging.ts b/dmp-frontend/src/environments/environment.staging.ts index 6f80a3012..63cfd85e5 100644 --- a/dmp-frontend/src/environments/environment.staging.ts +++ b/dmp-frontend/src/environments/environment.staging.ts @@ -24,7 +24,8 @@ export const environment = { b2accessConfiguration: { clientId: '', oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz', - redirectUri: 'http://devel.opendmp.eu/api/oauth/authorized/b2access' + redirectUri: 'http://devel.opendmp.eu/api/oauth/authorized/b2access', + state: '' }, orcidConfiguration: { clientId: '', diff --git a/dmp-frontend/src/environments/environment.ts b/dmp-frontend/src/environments/environment.ts index 1e079ce43..193d09ace 100644 --- a/dmp-frontend/src/environments/environment.ts +++ b/dmp-frontend/src/environments/environment.ts @@ -25,7 +25,8 @@ export const environment = { b2accessConfiguration: { clientId: '', oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz', - redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access' + redirectUri: 'http://localhost:4200/api/oauth/authorized/b2access', + state: '' }, orcidConfiguration: { clientId: 'APP-766DI5LP8T75FC4R',