@better-auth/oauth-provider 1.5.0 → 1.5.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/utils-D6kv_BUA.mjs.map +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -444,7 +444,7 @@ async function checkVerificationValue(ctx, opts, code, client_id, redirect_uri)
|
|
|
444
444
|
error_description: "Invalid code",
|
|
445
445
|
error: "invalid_verification"
|
|
446
446
|
});
|
|
447
|
-
|
|
447
|
+
await ctx.context.internalAdapter.deleteVerificationByIdentifier(await storeToken(opts.storeTokens, code, "authorization_code"));
|
|
448
448
|
if (!verification.expiresAt || verification.expiresAt < /* @__PURE__ */ new Date()) throw new APIError("UNAUTHORIZED", {
|
|
449
449
|
error_description: "code expired",
|
|
450
450
|
error: "invalid_verification"
|
|
@@ -3745,7 +3745,7 @@ async function redirectWithAuthorizationCode(ctx, opts, verificationValue) {
|
|
|
3745
3745
|
authTime: verificationValue.authTime
|
|
3746
3746
|
})
|
|
3747
3747
|
};
|
|
3748
|
-
|
|
3748
|
+
await ctx.context.internalAdapter.createVerificationValue({
|
|
3749
3749
|
...data,
|
|
3750
3750
|
createdAt: /* @__PURE__ */ new Date(iat * 1e3)
|
|
3751
3751
|
});
|