core: oauth: set rate limit for oauth

This commit is contained in:
undefined committed 2026-03-09 01:56:41 +08:00
1 parent ff8345cf96
commit 36892f950c
1 file changed
+1
+1
View File
@@ -464,6 +464,7 @@ class OauthCallbackHandler extends Handler {
async get(args: any) {
const provider = this.ctx.oauth.providers[args.type];
if (!provider) throw new UserFacingError('Oauth type');
await this.limitRate('oauth_callback', 60, 5);
const r = await provider.callback.call(this, args);
if (this.session.oauthBind === args.type) {
delete this.session.oauthBind;