using IDNOT_REDIRECT_URL instead of APP_HOST

This commit is contained in:
Vins 2023-12-01 11:56:50 +01:00
parent a3e88cdbd2
commit 7c07b5674d
2 changed files with 6 additions and 3 deletions

View File

@ -117,11 +117,14 @@ export default class IdNotService extends BaseService {
const query = new URLSearchParams({
client_id: this.variables.IDNOT_CLIENT_ID,
client_secret: this.variables.IDNOT_CLIENT_SECRET,
redirect_uri: `${this.variables.APP_HOST}/authorized-client`,
redirect_uri: this.variables.IDNOT_REDIRECT_URL,
code: code,
grant_type: "authorization_code",
});
const token = await fetch(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" });
if(token.status !== 200) console.error(await token.text());
const decodedToken = (await token.json()) as IIdNotToken;
const decodedIdToken = jwt.decode(decodedToken.id_token) as IdNotJwtPayload;