diff --git a/.env.template b/.env.template
index 5328fe08..0bd7bf6d 100644
--- a/.env.template
+++ b/.env.template
@@ -22,7 +22,7 @@ MAX_USERNAME_LENGTH=8
OPID_CLIENT_ID=
OPID_CLIENT_SECRET=
OPID_CLIENT_ISSUER=
-OPID_CLIENT_REDIREC_URL=
+OPID_CLIENT_REDIRECT_URL=
OPID_LOGIN_SCREEN_PROVIDER=http://pusher.workadventure.localhost/login-screen
OPID_PROFILE_SCREEN_PROVIDER=
DISABLE_ANONYMOUS=
diff --git a/docker-compose.single-domain.yaml b/docker-compose.single-domain.yaml
index e241c108..cd38a0f9 100644
--- a/docker-compose.single-domain.yaml
+++ b/docker-compose.single-domain.yaml
@@ -71,7 +71,7 @@ services:
OPID_CLIENT_ID: $OPID_CLIENT_ID
OPID_CLIENT_SECRET: $OPID_CLIENT_SECRET
OPID_CLIENT_ISSUER: $OPID_CLIENT_ISSUER
- OPID_CLIENT_REDIREC_URL: $OPID_CLIENT_REDIREC_URL
+ OPID_CLIENT_REDIRECT_URL: $OPID_CLIENT_REDIRECT_URL
OPID_PROFILE_SCREEN_PROVIDER: $OPID_PROFILE_SCREEN_PROVIDER
DISABLE_ANONYMOUS: $DISABLE_ANONYMOUS
volumes:
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 03395f22..0e22fa91 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -73,7 +73,7 @@ services:
OPID_CLIENT_ID: $OPID_CLIENT_ID
OPID_CLIENT_SECRET: $OPID_CLIENT_SECRET
OPID_CLIENT_ISSUER: $OPID_CLIENT_ISSUER
- OPID_CLIENT_REDIREC_URL: $OPID_CLIENT_REDIREC_URL
+ OPID_CLIENT_REDIRECT_URL: $OPID_CLIENT_REDIRECT_URL
OPID_PROFILE_SCREEN_PROVIDER: $OPID_PROFILE_SCREEN_PROVIDER
DISABLE_ANONYMOUS: $DISABLE_ANONYMOUS
volumes:
diff --git a/front/src/Connexion/ConnectionManager.ts b/front/src/Connexion/ConnectionManager.ts
index 793831bf..9316e37f 100644
--- a/front/src/Connexion/ConnectionManager.ts
+++ b/front/src/Connexion/ConnectionManager.ts
@@ -183,8 +183,11 @@ class ConnectionManager {
} else {
try {
await this.checkAuthUserConnexion();
+ analyticsClient.loggedWithSso();
} catch (err) {
console.error(err);
+ this.loadOpenIDScreen();
+ return Promise.reject(new Error("You will be redirect on login page"));
}
}
this.localUser = localUserStore.getLocalUser() as LocalUser; //if authToken exist in localStorage then localUser cannot be null
diff --git a/pusher/src/Controller/AuthenticateController.ts b/pusher/src/Controller/AuthenticateController.ts
index 0cef24bb..70e333a8 100644
--- a/pusher/src/Controller/AuthenticateController.ts
+++ b/pusher/src/Controller/AuthenticateController.ts
@@ -66,7 +66,6 @@ export class AuthenticateController extends BaseController {
throw Error("Token cannot to be check on Hydra");
}
const resCheckTokenAuth = await openIDClient.checkTokenAuth(authTokenData.accessToken);
- console.log("resCheckTokenAuth", resCheckTokenAuth);
res.writeStatus("200");
this.addCorsHeaders(res);
return res.end(JSON.stringify({ authToken: token }));
diff --git a/pusher/src/Controller/OpenIdProfileController.ts b/pusher/src/Controller/OpenIdProfileController.ts
index 372b603b..f33e7a22 100644
--- a/pusher/src/Controller/OpenIdProfileController.ts
+++ b/pusher/src/Controller/OpenIdProfileController.ts
@@ -44,37 +44,37 @@ export class OpenIdProfileController extends BaseController {
}
buildHtml(domain: string, email: string, pictureUrl?: string) {
- return (
- "" +
- `
-