Merge branch 'staging' into dev
This commit is contained in:
commit
b1cd16e154
@ -107,23 +107,18 @@ export default class IdNotService extends BaseService {
|
||||
}
|
||||
|
||||
public async getIdNotToken(code: string) {
|
||||
const redirect_uri: string = `${this.variables.APP_HOST}/authorized-client`;
|
||||
console.log(redirect_uri);
|
||||
|
||||
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.APP_HOST}/authorized-client`,
|
||||
code: code,
|
||||
grant_type: "authorization_code",
|
||||
});
|
||||
console.log(query);
|
||||
|
||||
const token = await fetch(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" });
|
||||
const token = await fetch(this.variables.IDNOT_BASE_URL + this.variables.IDNOT_CONNEXION_URL + "?" + query, { method: "POST" });
|
||||
const decodedToken = (await token.json()) as IIdNotToken;
|
||||
console.log(decodedToken);
|
||||
|
||||
const decodedIdToken = jwt.decode(decodedToken.id_token) as IdNotJwtPayload;
|
||||
|
||||
return decodedIdToken;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user