fix login callback url

This commit is contained in:
OxSaitama 2023-05-10 17:11:04 +02:00
parent 187268bd67
commit 074e33329d
4 changed files with 2 additions and 8 deletions

View File

@ -1,6 +1,6 @@
import { File } from "le-coffre-resources/dist/SuperAdmin"; import { File } from "le-coffre-resources/dist/SuperAdmin";
import Container, { Service } from "typedi"; import Container, { Service } from "typedi";
import "reflect-metadata";
import BaseSuperAdmin from "../BaseSuperAdmin"; import BaseSuperAdmin from "../BaseSuperAdmin";
import CryptoService from "@Front/Services/CryptoService/CryptoService"; import CryptoService from "@Front/Services/CryptoService/CryptoService";

View File

@ -30,7 +30,7 @@ export default class LoginClass extends BasePage {
private redirectUserOnConnection() { private redirectUserOnConnection() {
const variables = FrontendVariables.getInstance(); const variables = FrontendVariables.getInstance();
const baseFronturl = const baseFronturl =
variables.BACK_API_PROTOCOL + variables.FRONT_APP_HOST + (variables.FRONT_APP_PORT ? ":" + variables.FRONT_APP_PORT : ""); variables.BACK_API_PROTOCOL + variables.FRONT_APP_HOST;
const authorizeEndPoint = variables.IDNOT_AUTHORIZE_ENDPOINT; const authorizeEndPoint = variables.IDNOT_AUTHORIZE_ENDPOINT;
const clientId = variables.IDNOT_CLIENT_ID; const clientId = variables.IDNOT_CLIENT_ID;
const url = `${authorizeEndPoint}?client_id=${clientId}&redirect_uri=${baseFronturl}/authorized-client&scope=openid,profile,offline_access&response_type=code`; const url = `${authorizeEndPoint}?client_id=${clientId}&redirect_uri=${baseFronturl}/authorized-client&scope=openid,profile,offline_access&response_type=code`;

View File

@ -11,8 +11,6 @@ export class FrontendVariables {
public FRONT_APP_HOST!: string; public FRONT_APP_HOST!: string;
public FRONT_APP_PORT!: string;
public IDNOT_AUTHORIZE_ENDPOINT!: string; public IDNOT_AUTHORIZE_ENDPOINT!: string;
public IDNOT_CLIENT_ID!: string; public IDNOT_CLIENT_ID!: string;

View File

@ -17,7 +17,6 @@ type AppPropsWithLayout = AppProps & {
backApiRootUrl: string; backApiRootUrl: string;
backApiVersion: string; backApiVersion: string;
frontAppHost: string; frontAppHost: string;
frontAppPort: string;
idNotAuthorizeEndpoint: string; idNotAuthorizeEndpoint: string;
idNotClientId: string; idNotClientId: string;
}; };
@ -30,7 +29,6 @@ const MyApp = (({
backApiRootUrl, backApiRootUrl,
backApiVersion, backApiVersion,
frontAppHost, frontAppHost,
frontAppPort,
idNotAuthorizeEndpoint, idNotAuthorizeEndpoint,
idNotClientId, idNotClientId,
}: AppPropsWithLayout) => { }: AppPropsWithLayout) => {
@ -41,7 +39,6 @@ const MyApp = (({
FrontendVariables.getInstance().BACK_API_ROOT_URL = backApiRootUrl; FrontendVariables.getInstance().BACK_API_ROOT_URL = backApiRootUrl;
FrontendVariables.getInstance().BACK_API_VERSION = backApiVersion; FrontendVariables.getInstance().BACK_API_VERSION = backApiVersion;
FrontendVariables.getInstance().FRONT_APP_HOST = frontAppHost; FrontendVariables.getInstance().FRONT_APP_HOST = frontAppHost;
FrontendVariables.getInstance().FRONT_APP_PORT = frontAppPort;
FrontendVariables.getInstance().IDNOT_AUTHORIZE_ENDPOINT = idNotAuthorizeEndpoint; FrontendVariables.getInstance().IDNOT_AUTHORIZE_ENDPOINT = idNotAuthorizeEndpoint;
FrontendVariables.getInstance().IDNOT_CLIENT_ID = idNotClientId; FrontendVariables.getInstance().IDNOT_CLIENT_ID = idNotClientId;
@ -55,7 +52,6 @@ MyApp.getInitialProps = async () => {
backApiRootUrl: process.env["BACK_API_ROOT_URL"], backApiRootUrl: process.env["BACK_API_ROOT_URL"],
backApiVersion: process.env["BACK_API_VERSION"], backApiVersion: process.env["BACK_API_VERSION"],
frontAppHost: process.env["FRONT_APP_HOST"], frontAppHost: process.env["FRONT_APP_HOST"],
frontAppPort: process.env["FRONT_APP_PORT"],
idNotAuthorizeEndpoint: process.env["IDNOT_AUTHORIZE_ENDPOINT"], idNotAuthorizeEndpoint: process.env["IDNOT_AUTHORIZE_ENDPOINT"],
idNotClientId: process.env["IDNOT_CLIENT_ID"], idNotClientId: process.env["IDNOT_CLIENT_ID"],
}; };