diff --git a/src/services/common/IdNotService/IdNotService.ts b/src/services/common/IdNotService/IdNotService.ts index 051132aa..99b732ba 100644 --- a/src/services/common/IdNotService/IdNotService.ts +++ b/src/services/common/IdNotService/IdNotService.ts @@ -121,12 +121,20 @@ export default class IdNotService extends BaseService { code: code, grant_type: "authorization_code", }); + console.log(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query.toString()); + const token = await fetch(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" }); + console.log(token.status); + if(token.status !== 200) console.error(await token.text()); const decodedToken = (await token.json()) as IIdNotToken; + console.log(decodedToken); + const decodedIdToken = jwt.decode(decodedToken.id_token) as IdNotJwtPayload; + console.log(decodedIdToken); + return decodedIdToken; }