HM Screening
A conversation with the hiring manager, mainly about past project experience, behavioral questions, and various real workplace scenarios.
Take-Home Assignment
Build a rate limiter in Node.js using the token bucket algorithm.
- Create an Express application that can read a configuration file.
- Expose an API that returns a rate-limit response.
Technical Round - Code Review & Debugging
Code Review: Review the actual implementation of the rate limiter submitted earlier and explain the reasons for the particular code architecture and structure.
Code Debugging / Optimization: Analyze and optimize a simple Node.js Express API endpoint,
/authenticate. - The endpoint takes a username and password, queries the database, uses bcrypt to check the password against its hash, and returns 200 or an error.
- Find all the missing logic, such as input validation and error handling, and add the correct HTTP status codes.
- Change the originally synchronous bcrypt comparison to an asynchronous implementation to avoid blocking the event loop.
System Design
Cross-domain single sign-on design: - A business originally owned one domain and has recently acquired another domain.
- After users sign in to one domain, they need to be signed in automatically to the other.
- Design and explain the specific flow that implements this requirement.
OIDC (OpenID Connect) multi-site login: - There are multiple sites that need cross-site login.
- Within the app, users need access to certain third-party tools. Design the overall architecture and authorization flow.
Discussion
Loading comments…