16 lines
543 B
JavaScript
16 lines
543 B
JavaScript
import { getAuthenticatedAPIClient } from '@edx/frontend-auth';
|
|
|
|
import { configuration } from '../config';
|
|
|
|
const apiClient = getAuthenticatedAPIClient({
|
|
appBaseUrl: configuration.BASE_URL,
|
|
loginUrl: configuration.LOGIN_URL,
|
|
logoutUrl: configuration.LOGOUT_URL,
|
|
csrfTokenApiPath: process.env.CSRF_TOKEN_API_PATH,
|
|
refreshAccessTokenEndpoint: configuration.REFRESH_ACCESS_TOKEN_ENDPOINT,
|
|
accessTokenCookieName: configuration.ACCESS_TOKEN_COOKIE_NAME,
|
|
csrfCookieName: configuration.CSRF_COOKIE_NAME,
|
|
});
|
|
|
|
export default apiClient;
|