Use access token rather than id token when calling API

This commit is contained in:
2019-01-22 13:30:41 +01:00
parent 9c0726b7db
commit 0470844f4a
4 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ const webAuth = require("../auth").default;
module.exports = {
includeCredentials: (uri, options) => {
const token = webAuth.idToken();
const token = webAuth.accessToken();
if (token) {
options.headers['Authorization'] = 'Bearer ' + token;
}