Edit: /tmp/tsx-0/17887-28742bdae3e3b44935996860ebc5dd9ec3eff12a (4387B)
{"code":"__filename=\"/opt/canhelp/node_modules/better-auth/node_modules/@better-auth/core/dist/social-providers/linkedin.mjs\";(()=>{\nvar __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __name=(target,value)=>__defProp(target,\"name\",{value,configurable:true});var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from===\"object\"||typeof from===\"function\"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},\"__esModule\",{value:true}),mod);var linkedin_exports={};__export(linkedin_exports,{linkedin:()=>linkedin});module.exports=__toCommonJS(linkedin_exports);var import_create_authorization_url=require(\"../oauth2/create-authorization-url.mjs\");var import_refresh_access_token=require(\"../oauth2/refresh-access-token.mjs\");var import_validate_authorization_code=require(\"../oauth2/validate-authorization-code.mjs\");var import_oauth2=require(\"../oauth2/index.mjs\");var import_fetch=require(\"@better-fetch/fetch\");const linkedin=__name(options=>{const authorizationEndpoint=\"https://www.linkedin.com/oauth/v2/authorization\";const tokenEndpoint=\"https://www.linkedin.com/oauth/v2/accessToken\";return{id:\"linkedin\",name:\"Linkedin\",createAuthorizationURL:__name(async({state,scopes,redirectURI,loginHint})=>{const _scopes=options.disableDefaultScope?[]:[\"profile\",\"email\",\"openid\"];if(options.scope)_scopes.push(...options.scope);if(scopes)_scopes.push(...scopes);return await(0,import_create_authorization_url.createAuthorizationURL)({id:\"linkedin\",options,authorizationEndpoint,scopes:_scopes,state,loginHint,redirectURI})},\"createAuthorizationURL\"),validateAuthorizationCode:__name(async({code,redirectURI})=>{return await(0,import_validate_authorization_code.validateAuthorizationCode)({code,redirectURI,options,tokenEndpoint})},\"validateAuthorizationCode\"),refreshAccessToken:options.refreshAccessToken?options.refreshAccessToken:async refreshToken=>{return(0,import_refresh_access_token.refreshAccessToken)({refreshToken,options:{clientId:options.clientId,clientKey:options.clientKey,clientSecret:options.clientSecret},tokenEndpoint})},async getUserInfo(token){if(options.getUserInfo)return options.getUserInfo(token);const{data:profile,error}=await(0,import_fetch.betterFetch)(\"https://api.linkedin.com/v2/userinfo\",{method:\"GET\",headers:{Authorization:`Bearer ${token.accessToken}`}});if(error)return null;const userMap=await options.mapProfileToUser?.(profile);return{user:{id:profile.sub,name:profile.name,email:profile.email,emailVerified:profile.email_verified||false,image:profile.picture,...userMap},data:profile}},options}},\"linkedin\");0&&(module.exports={linkedin});\n})()\n","warnings":[],"map":{"version":3,"mappings":";suBAAA,6JAAuC,kDACvC,gCAAmC,8CACnC,uCAA0C,qDAC1C,kBAAO,+BACP,iBAA4B,+BAG5B,MAAM,SAAW,OAAC,SAAY,CAC7B,MAAM,sBAAwB,kDAC9B,MAAM,cAAgB,gDACtB,MAAO,CACN,GAAI,WACJ,KAAM,WACN,uBAAwB,aAAO,CAAE,MAAO,OAAQ,YAAa,SAAU,IAAM,CAC5E,MAAM,QAAU,QAAQ,oBAAsB,CAAC,EAAI,CAClD,UACA,QACA,QACD,EACA,GAAI,QAAQ,MAAO,QAAQ,KAAK,GAAG,QAAQ,KAAK,EAChD,GAAI,OAAQ,QAAQ,KAAK,GAAG,MAAM,EAClC,OAAO,QAAM,wDAAuB,CACnC,GAAI,WACJ,QACA,sBACA,OAAQ,QACR,MACA,UACA,WACD,CAAC,CACF,EAjBwB,0BAkBxB,0BAA2B,aAAO,CAAE,KAAM,WAAY,IAAM,CAC3D,OAAO,QAAM,8DAA0B,CACtC,KACA,YACA,QACA,aACD,CAAC,CACF,EAP2B,6BAQ3B,mBAAoB,QAAQ,mBAAqB,QAAQ,mBAAqB,MAAO,cAAiB,CACrG,SAAO,gDAAmB,CACzB,aACA,QAAS,CACR,SAAU,QAAQ,SAClB,UAAW,QAAQ,UACnB,aAAc,QAAQ,YACvB,EACA,aACD,CAAC,CACF,EACA,MAAM,YAAY,MAAO,CACxB,GAAI,QAAQ,YAAa,OAAO,QAAQ,YAAY,KAAK,EACzD,KAAM,CAAE,KAAM,QAAS,KAAM,EAAI,QAAM,0BAAY,uCAAwC,CAC1F,OAAQ,MACR,QAAS,CAAE,cAAe,UAAU,MAAM,WAAW,EAAG,CACzD,CAAC,EACD,GAAI,MAAO,OAAO,KAClB,MAAM,QAAU,MAAM,QAAQ,mBAAmB,OAAO,EACxD,MAAO,CACN,KAAM,CACL,GAAI,QAAQ,IACZ,KAAM,QAAQ,KACd,MAAO,QAAQ,MACf,cAAe,QAAQ,gBAAkB,MACzC,MAAO,QAAQ,QACf,GAAG,OACJ,EACA,KAAM,OACP,CACD,EACA,OACD,CACD,EAjEiB","names":[],"ignoreList":[],"sources":["/opt/canhelp/node_modules/better-auth/node_modules/@better-auth/core/dist/social-providers/linkedin.mjs"],"sourcesContent":[null]}}