/** * Creates the SSO module for the Base44 SDK. * * @param axios - Axios instance * @param appId - Application ID * @param userToken - User authentication token * @returns SSO module with authentication methods * @internal */ export function createSsoModule(axios, appId, userToken) { return { // Get SSO access token for a specific user async getAccessToken(userid) { const url = `/apps/${appId}/auth/sso/accesstoken/${userid}`; // Prepare headers with both tokens if available const headers = {}; if (userToken) { headers["on-behalf-of"] = `Bearer ${userToken}`; } return axios.get(url, { headers }); }, }; }