console.log("Hello, bright and wonderful people");140export const signIn = async (email: string, password: string, ip: string): Promise<AuthToken> => {
141 // get, check and increase signin attempt
142 const signinAttemptsCacheKey = AUTH_CACHE_KEYS.SIGNIN_ATTEMPT(ip);
143 let signinAttempts = Number(await getCache(signinAttemptsCacheKey)) | 0;
144
145 if (signinAttempts >= MAX_SIGNIN_ATTEMPT) {
146 return tooManyAttemptHandler({ cacheKey: signinAttemptsCacheKey, message: "Too many sign-in requests detected." });
147 }
148
149 signinAttempts++;
150 await setCache(signinAttemptsCacheKey, signinAttempts, { PX: 6 * 60 * 60 * 1000 });
151
152 // get and check email signin attempt
153 const emailSigninAttemptsCacheKey = AUTH_CACHE_KEYS.EMAIL_SIGNIN_ATTEMPT(email, ip);
154 let attempt = Number(await getCache(emailSigninAttemptsCacheKey) || 0);
155
156 if (attempt >= MAX_EMAIL_SIGNIN_ATTEMPT) {
157 return tooManyAttemptHandler({ cacheKey: emailSigninAttemptsCacheKey, message: "Too many sign-in attempts for this account." });
158 }
159 Hello there,
I'm a web developer who started learning frontend development in 2020 and expanded into full-stack development in 2024.
I don't have many projects, as I tend to spend more time diving deep into specific topics. Here are some of the projects I've built along the way. π





Youtube Channel
I used to share some of my frontend coding experiments on my YouTube channel. Itβs not a big channel, but itβs where I show what I enjoy building.
Let's see