Edit: /tmp/tsx-0/17887-b0ca7a36bae292d60c361deb501a0336aafe815a (4253B)
{"code":"__filename=\"/opt/canhelp/node_modules/better-auth/node_modules/@better-auth/core/dist/social-providers/naver.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 naver_exports={};__export(naver_exports,{naver:()=>naver});module.exports=__toCommonJS(naver_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 naver=__name(options=>{const tokenEndpoint=\"https://nid.naver.com/oauth2.0/token\";return{id:\"naver\",name:\"Naver\",createAuthorizationURL({state,scopes,redirectURI}){const _scopes=options.disableDefaultScope?[]:[\"profile\",\"email\"];if(options.scope)_scopes.push(...options.scope);if(scopes)_scopes.push(...scopes);return(0,import_create_authorization_url.createAuthorizationURL)({id:\"naver\",options,authorizationEndpoint:\"https://nid.naver.com/oauth2.0/authorize\",scopes:_scopes,state,redirectURI})},validateAuthorizationCode:__name(async({code,redirectURI})=>{return(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://openapi.naver.com/v1/nid/me\",{headers:{Authorization:`Bearer ${token.accessToken}`}});if(error||!profile||profile.resultcode!==\"00\")return null;const userMap=await options.mapProfileToUser?.(profile);const res=profile.response||{};return{user:{id:res.id,name:res.name||res.nickname||\"\",email:res.email,image:res.profile_image,emailVerified:false,...userMap},data:profile}},options}},\"naver\");0&&(module.exports={naver});\n})()\n","warnings":[],"map":{"version":3,"mappings":";suBAAA,8IAAuC,kDACvC,gCAAmC,8CACnC,uCAA0C,qDAC1C,kBAAO,+BACP,iBAA4B,+BAG5B,MAAM,MAAQ,OAAC,SAAY,CAC1B,MAAM,cAAgB,uCACtB,MAAO,CACN,GAAI,QACJ,KAAM,QACN,uBAAuB,CAAE,MAAO,OAAQ,WAAY,EAAG,CACtD,MAAM,QAAU,QAAQ,oBAAsB,CAAC,EAAI,CAAC,UAAW,OAAO,EACtE,GAAI,QAAQ,MAAO,QAAQ,KAAK,GAAG,QAAQ,KAAK,EAChD,GAAI,OAAQ,QAAQ,KAAK,GAAG,MAAM,EAClC,SAAO,wDAAuB,CAC7B,GAAI,QACJ,QACA,sBAAuB,2CACvB,OAAQ,QACR,MACA,WACD,CAAC,CACF,EACA,0BAA2B,aAAO,CAAE,KAAM,WAAY,IAAM,CAC3D,SAAO,8DAA0B,CAChC,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,sCAAuC,CAAE,QAAS,CAAE,cAAe,UAAU,MAAM,WAAW,EAAG,CAAE,CAAC,EACvJ,GAAI,OAAS,CAAC,SAAW,QAAQ,aAAe,KAAM,OAAO,KAC7D,MAAM,QAAU,MAAM,QAAQ,mBAAmB,OAAO,EACxD,MAAM,IAAM,QAAQ,UAAY,CAAC,EACjC,MAAO,CACN,KAAM,CACL,GAAI,IAAI,GACR,KAAM,IAAI,MAAQ,IAAI,UAAY,GAClC,MAAO,IAAI,MACX,MAAO,IAAI,cACX,cAAe,MACf,GAAG,OACJ,EACA,KAAM,OACP,CACD,EACA,OACD,CACD,EAzDc","names":[],"ignoreList":[],"sources":["/opt/canhelp/node_modules/better-auth/node_modules/@better-auth/core/dist/social-providers/naver.mjs"],"sourcesContent":[null]}}