diff --git a/frontend/src/common/httpservice.ts b/frontend/src/common/httpservice.ts index cab9b26..8204944 100644 --- a/frontend/src/common/httpservice.ts +++ b/frontend/src/common/httpservice.ts @@ -17,12 +17,17 @@ const client = axios.create({ async function getAuthHeaders() { try { - const token = await auth0.getTokenSilently(); + const token = await auth0.getTokenSilently({ + authorizationParams: { + scope: "read:current_user", + audience: import.meta.env.VITE_AUTH0_AUDIENCE + } + }); return { Authorization: `Bearer ${token}` }; } catch (e) { - alert('Unable to get access token!!!'); + alert(`Unable to get access token: ${e}`); return {}; } }