diff --git a/utils/auth-client/index.js b/utils/auth-client/index.js index 12bf177..72be0ee 100644 --- a/utils/auth-client/index.js +++ b/utils/auth-client/index.js @@ -66,7 +66,7 @@ export default class AuthenticationClient { } checkSession(resolve, reject) { - this.webAuth.checkSession({state: {}}, (err, result) => { + this.webAuth.checkSession({state: {returnUrl: window.location.href}}, (err, result) => { if (err) { return reject(err || 'Re-authentication failed'); } else { diff --git a/utils/graph-client/utils.js b/utils/graph-client/utils.js index 5676ce4..57b4ea4 100644 --- a/utils/graph-client/utils.js +++ b/utils/graph-client/utils.js @@ -27,7 +27,7 @@ const errorLink = onError(({ graphQLErrors, networkError, operation, forward }) operation.setContext({ headers: { ...oldHeaders, - authorization: webAuth.idToken(), + Authorization: `Bearer ${webAuth.accessToken()}`, }, }); return forward(operation);