Fetch the appName context from window instead of fetching it from env variable (#6631)

* Fetch the appName context from window instead of hardcode it

* Remove useless file

* Get rid of the redirectUri variable

Until now the context of the app was created on the backend side and stored on the variable redirectUri. With this fix the context is determined by the FE

* remove useless docker variable

remove 
APP_CONFIG_OAUTH2_REDIRECT_LOGIN
APP_CONFIG_OAUTH2_REDIRECT_LOGOUT
the origin and context will be determined by the FE

* Update 30-sed-on-appconfig.sh

removing APP_CONFIG_OAUTH2_REDIRECT_LOGOUT and APP_CONFIG_OAUTH2_REDIRECT_LOGIN
This commit is contained in:
Maurizio Vitale
2021-10-06 16:18:57 +01:00
committed by GitHub
parent 9bf19256f0
commit dc133643c9
3 changed files with 2 additions and 18 deletions

View File

@@ -65,8 +65,8 @@ export class AlfrescoApiService {
protected initAlfrescoApi() {
const oauth: OauthConfigModel = Object.assign({}, this.appConfig.get<OauthConfigModel>(AppConfigValues.OAUTHCONFIG, null));
if (oauth) {
oauth.redirectUri = window.location.origin + (oauth.redirectUri || '/');
oauth.redirectUriLogout = window.location.origin + (oauth.redirectUriLogout || '/');
oauth.redirectUri = window.location.origin + window.location.pathname;
oauth.redirectUriLogout = window.location.origin + window.location.pathname;
}
const config = new AlfrescoApiConfig({