/opt/canhelp/node_modules/better-auth/dist/oauth2
NameSizeModeActions
index.d.mts3110644editdlrm
index.mjs3120644editdlrm
link-account.d.mts12260644editdlrm
link-account.mjs59950644editdlrm
link-account.mjs.map114300644editdlrm
state.d.mts7450644editdlrm
state.mjs18950644editdlrm
state.mjs.map33280644editdlrm
utils.d.mts3980644editdlrm
utils.mjs8300644editdlrm
utils.mjs.map15000644editdlrm
Edit: /opt/canhelp/node_modules/better-auth/dist/oauth2/utils.mjs (830B)
import { symmetricDecrypt, symmetricEncrypt } from "../crypto/index.mjs"; //#region src/oauth2/utils.ts /** * Check if a string looks like encrypted data */ function isLikelyEncrypted(token) { if (token.startsWith("$ba$")) return true; return token.length % 2 === 0 && /^[0-9a-f]+$/i.test(token); } function decryptOAuthToken(token, ctx) { if (!token) return token; if (ctx.options.account?.encryptOAuthTokens) { if (!isLikelyEncrypted(token)) return token; return symmetricDecrypt({ key: ctx.secretConfig, data: token }); } return token; } function setTokenUtil(token, ctx) { if (ctx.options.account?.encryptOAuthTokens && token) return symmetricEncrypt({ key: ctx.secretConfig, data: token }); return token; } //#endregion export { decryptOAuthToken, setTokenUtil }; //# sourceMappingURL=utils.mjs.map