Use access token rather than id token when calling API
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
getUserInfo,
|
||||
clear,
|
||||
getExpiresAt,
|
||||
getAccessToken,
|
||||
} from './storage';
|
||||
|
||||
export default class AuthenticationClient {
|
||||
@@ -113,4 +114,8 @@ export default class AuthenticationClient {
|
||||
idToken() {
|
||||
return getIdToken();
|
||||
}
|
||||
|
||||
accessToken() {
|
||||
return getAccessToken();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,4 +43,5 @@ export const clearStateAndNonce = () => {
|
||||
|
||||
export const getUserInfo = () => JSON.parse(localStorage.getItem(STORAGE_USER));
|
||||
export const getIdToken = () => localStorage.getItem(STORAGE_ID);
|
||||
export const getAccessToken = () => localStorage.getItem(STORAGE_ACCESS);
|
||||
export const getExpiresAt = () => JSON.parse(localStorage.getItem(STORAGE_EXPIRES));
|
||||
|
||||
Reference in New Issue
Block a user