I’m unsure how to go about migrating from getToken() to getIdToken(), currently I have this code to make a request to my Api.
const appId = miro.getClientId();
const clientId = appId.toString();
let token = await miro.getToken();
let boardInfo = await miro.board.info.get();
let teamInfo = await miro.account.get();
console.log(token)
return this.makeCall(() => fetch(`${this.baseUrl}/${clientId}/team/${teamInfo.id}/JiraCard/board/${encodeURIComponent(boardInfo.id)}`, {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + token,
'Content-Type': 'application/json'
},
body: JSON.stringify({ "issueKey": issueKey, "x": x, "y": y })
}), (successResponse) => successResponse.json())
If I replace getToken() with getIdToken() the OAuth Token is invalid, as getIdToken() returns a different type of token. How exactly do I go about decoding getIdToken()?