diff --git a/package.json b/package.json index bf53605..e467a66 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "trustauthx", - "version": "1.0.33", + "version": "1.0.34", "description": "", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/src/index.ts b/src/index.ts index 85287c1..1e44021 100644 --- a/src/index.ts +++ b/src/index.ts @@ -53,8 +53,7 @@ export class AuthLiteClient { else throw new Error("Must provide org_id"); } - async generateEditUserUrl(accessToken: string, url: string): Promise { - const headers = { accept: "application/json" }; + generateEditUserUrl(accessToken: string, url: string): string { const params = new URLSearchParams({ AccessToken: accessToken, api_key: this.apiKey, @@ -62,19 +61,7 @@ export class AuthLiteClient { url: url, }); - const apiResult = await makeRequest( - "https://api.trustauthx.com/api/user/me/settings/?" + params.toString(), - { headers } - ); - // return fetch('https://api.trustauthx.com/api/user/me/settings/?' + params.toString(), { - // method: 'GET', - // headers: headers, - // }).then((response) => { - // return response.url; - // }); - return apiResult.url!; - // DONE need to retun the url got from apiResult and also need to give the generics to the makeRequest function - // DONE fix the return type as well + return `https://api.trustauthx.com/api/user/me/settings/?${params.toString()}`; } async reAuth(code: string): Promise<{ email: string; uid: string }> {