Skip to main contentArrow Right
A red neon sign reading "ESCAPE ROOMS" in capital letters glows against a dark wall at night, with a few small out-of-focus lights above and below it.

Table of Contents

Summarize with AI

Don't have the time to read the entire post? Our human writers will be sad, but we understand. Summarize the post with your preferred LLM here instead.

As an intern at Descope, my first week was very exciting as I was given a great opportunity to dive straight into my own project: The Descope Escape Room. I had encountered the escape room before as it is an important part of the Descope hiring process for the DevRel team. 

It was a fun challenge that brought an interesting twist to the standard technical challenge that companies in the industry give to potential hires. The point of it was to test if applicants were able to learn to use the basics of the Descope Flows using Descope’s documentation. It tests the ability of the candidate to learn quickly and their persistence when approaching a task. 

However, when I was doing the escape room, there were issues with the site that presented themselves to me and my first task was to solve them. 

To know what the problems were and how I used Descope Flows to fix them, keep on reading!

Escape room v1

Before working on the escape room, the introduction for all participants to the challenge was just a block of text – a plain HTML file whose only purpose was to link people to the next page of the task. Except for this introduction, no other part of the hiring challenge was done on the site itself.

The original escape room page: plain white monospace text on a black background, dated Thursday, June 27, 2024, with the heading "CODEEPS CONFIDENTIAL, FOR YOUR EYES ONLY." The text reads: "We are Codeeps, a global secret organization that operates behind the scenes to maintain global stability and security. We have been around for centuries, working in secrecy to protect the world from threats both foreign and domestic. Codeeps is responsible for preventing wars, thwarting terrorist attacks, and uncovering conspiracies that threaten global security. We work with governments and intelligence agencies around the world, sharing information and resources to keep the world safe. Our agents are highly trained and specialized, with skills in intelligence gathering, covert operations, and combat. They operate in the shadows, blending seamlessly into their surroundings to avoid detection. As part of an ongoing operation to prevent from the evil state of Koytchatts acquiring technology that will break all encryption algorithms in the world, our top agent (codename: glorious) has disappeared. Just before we lost contact, the agent was able to send us a cryptic note that points to" a link whose URL is redacted. "This URL seems to be a ReactJS application but we could not figure out why it is not working. We believe that once the application is fixed, it will tell us what happened to our agent, and hopefully, we can rescue him. Your mission, should you choose to accept it: figure out why the app is broken, fix it, and find out where is our agent. Needless to say, If you fail, or are captured, we will disavow any knowledge of your actions. Good luck! Codeeps."
Fig: The original escape room

Additionally, anyone could access the escape room which would allow people to attempt it before ever beginning the hiring process. The submission process for the escape room was also confusing for applicants. When I was applying to Descope, I was unsure what files or screenshots were needed to show my work with the escape room challenge. I also ran into some issues with sending over my code due to Gmail restrictions. 

My goal was to solve the aforementioned challenges by adding Descope Flows to the DevRel escape room.

Building the challenge

The escape room needed to keep the user authenticated regardless of if they left the page. This meant that the escape room could not be built into the same flow as the authentication one. They would have to be built separately and the right flow would have to be displayed based on whether or not the user was authenticated. 

The auth flow

The first flow would control access to the escape room by adding an authentication layer that only allowed invited users to log in and attempt the escape room challenge.

DevRel Escape Room Auth Flow 1
Fig: Authenticating the user pt.1

At the beginning of the flow, a screen is displayed that prompts the user for their email. If the email has not been invited, they cannot continue. If they have been, it checks if a passkey is already configured and uses that to authenticate if it has been.

Section of a flow in the Descope Flows editor showing the one-time password (OTP) path. An action step titled "Sign In / OTP / Email" with the outcome "Email Sent" leads to a screen step titled "Verify OTP" with the button "Verify OTP code," which leads to an action step titled "Verify Code / OTP / Email" with the outcome "Successful authentication." That connects to a screen step titled "New Screen" with the button "Next," which leads to an action step titled "Update User / Passkeys..." with the outcome "Successful authentication." Above it, a separate line running from the left edge feeds an action step titled "Sign In / Passkeys (WebAuthn)" with the outcome "Successful authentication." The outputs of both passkey steps merge into one line that continues off the right edge.
Fig: Authenticating the user pt.2

If the user does not have a passkey yet, it allows them to login with a one-time password (OTP) sent to their email. After authenticating, it asks if they would like to enable passkeys to simplify the authentication process in the future.

Using flows, I was able to simplify inviting users and signing them up using multiple authentication methods.

The escape room flow

The next task was putting the escape room process all on one page using a flow. Although the main use case of Descope Flows is for creating authentication processes, they can also be used to create an interactive page for users. 

I wanted the process for participants to be seamless – when they got their answer in the escape room, they should be able to submit directly through the site. This meant recording their final answer, the process they took to reach the answer, and the code that they used to reach it.

Section of the escape room flow in the Descope Flows editor. A screen step titled "Intro" with the button "Let's Go!" connects to a screen step titled "Codeeps URL" with two buttons, "Back" and "Next." Each of those buttons connects to an action step titled "Update User / Properties" with the outcome "Success," one positioned above the screens and one to the right. Several other connector lines cross the canvas and continue beyond the edges of the image.
Fig: Introduction to the escape room

The first part of this flow is what the entire escape room website used to be. It is a screen introducing the challenge and linking users to the starter code for the escape room.

Section of the escape room flow in the Descope Flows editor showing the submission steps, from left to right. A screen step titled "Solution - with description" has the buttons "Back" and "Next." It connects to a screen step titled "Upload app.js" with the buttons "Back" and "Next," which leads to a connector step titled "Generic HTTP / POST" with the outcome "Success." That leads to a screen step titled "Upload index.js" with the buttons "Back" and "Next," which leads to a second connector step titled "Generic HTTP / POST" with the outcome "Success." Its output continues off the right edge.
Fig: Submitting answers to the escape room

The second half of the flow allows users to submit answers. The first screen has input spaces for the user to enter their answers and how they got to it. The next two screens allow the user to upload their code and use HTTP requests to store and send the documents.

Using the flow above, I was able to introduce the screens needed to take in all of the important information from each user’s attempt at the escape room. The flow then packages it all together so that it can be emailed all in one as the solution to the escape room.

The email

When I first tried to add the send email step to the flow, I used the Descope SendGrid Connector to try to email the written answers and the documents together. However, the files sent were .js files, which Gmail blocks regardless of the sender or if the files are zipped. 

Because of this, I needed to find another solution to how candidates could deliver all the content in the files without them being .js files. To solve this problem, I used Descope’s generic HTTP connector to make a POST request with the documents in the payload to deliver the documents to the backend. 

Configuration panel for a connector step in the Descope Flows editor, titled "Generic HTTP / POST," with the subtitle "Action: Generic HTTP / POST" and the description "Perform a POST request." The "Step name" field is set to "Generic HTTP / POST." The "Connector" dropdown is set to "Send." The "Base URL" field shows "https://descope-escape-room.com/api/send" and the "Endpoint" field shows "/". The "Payload" field contains this JSON: { "app": "{{connectors.copy.body}}", "index": "{{document}}", "email": "{{user.email}}", "location": "{{user.customAttributes.location}}", "description": "{{user.customAttributes.description}}", "company": "{{user.customAttributes.companyId}}" }. Helper text below reads, "Customize your message using dynamic values. Start typing "{{" to view all options, or hit Ctrl + Space." The "Timeout" field is set to 3 seconds. The "Context Key" field reads "connectors.httpResult," with the helper text, "The response will be mapped into this key. You can use a Condition Step to later refer to this key and query its data." Below are a collapsed "Error handling" section, the start of a "Test" section, and "Cancel" and "Done" buttons.
Fig: Connector making the POST request

Then at the endpoint, I converted the documents to a .txt file so that they could be sent in the email, and used the SendGrid API to deliver the solution packaged together.

Gmail message with the subject "[Escape Room Solution]" followed by a redacted address ending in "@descope.com" and an "Inbox" label. The sender is a redacted address ending in "@descope.com," sent "to me." The body has two lines, "Location:" and "Description:," with both values redacted. Below, a section reads "2 Attachments, Scanned by Gmail" and shows two text file attachments named "app.txt" and "index.txt."
Fig: Solution email format

With this convenient email format, the answers and code could be reviewed in a simple way to help improve the hiring process.

Escape room v2

The updated escape room intro screen, styled like a retro video game with green pixel text on a dark, starry background and a dotted world map. The date "Thursday, June 27, 2024" appears at the top, and the banner "CONFIDENTIAL CODEEPS MESSAGE !! DO NOT SHARE !!" appears above and below a green-bordered panel. The panel reads: "We are Codeeps, a global secret organization that operates behind the scenes to maintain global stability and security. Codeeps has been around for centuries and is responsible for preventing wars, thwarting terrorist attacks, and uncovering conspiracies that threaten global security. We work with intelligence agencies around the world, sharing information and resources to keep the world safe. As part of an ongoing operation to prevent the evil state of Koytchatts acquiring technology that will break all encryption algorithms in the world, our top agent (codename: Glorious) has disappeared. Just before we lost contact, the agent was able to send us a cryptic note that we will show you shortly. This URL seems to be a ReactJS application but we could not figure out why it is not working. We believe that once the application is fixed, it will tell us what happened to our agent, and hopefully, we can rescue him. Your mission, should you choose to accept it: figure out why the app is broken, fix it, and find out where is our agent. Needless to say, if you fail, or are captured, we will disavow any knowledge of your actions. Good luck! Codeeps." A green "Let's Go!" button sits at the bottom of the panel.
Fig: Updated escape room look

By using Descope Flows and giving the escape room a more user-friendly interface, the issues that I initially encountered when doing the escape room the first time were solved. The updated site now guides candidates through an engaging and secure experience, streamlines the submission process, and ensures that only invited applicants can participate.

The updated escape room solution submission screen, in the same retro green pixel style, dated "Friday, June 28, 2024," with the banner "CONFIDENTIAL CODEEPS MESSAGE !! DO NOT SHARE !!" above and below a green-bordered form. The form has three prompts, each with an input field: "Completed? Fill in the location of Glorious" with a required "Location" field, "Next, please explain the solution for each step/error you encountered" with a larger "Description" text area, and "Please copy your Descope company ID" with a required "Company ID" field. The entered values in all three fields are redacted. Green "Back" and "Next" buttons sit at the bottom.
Fig: Solution submission
The updated escape room code upload screen, in the same retro green pixel style, dated "Friday, June 28, 2024," with the banner "CONFIDENTIAL CODEEPS MESSAGE !! DO NOT SHARE !!" above and below a green-bordered panel. The panel reads "Please attach your app.js file" and contains an upload area labeled "Upload app.js" with the text "Upload a document *" and "Click the button below to upload a document," followed by an "Upload" button. Green "Back" and "Next" buttons sit at the bottom of the panel.
Fig: Uploading the code

Learning through experience

Updating the Descope Escape Room gave me a great opportunity to learn more about using flows and also sparked a passion for the work I’ll continue to do throughout my internship here. The challenges I faced while working on the updated escape room pushed me to problem-solve in new ways. It taught me about the startup mentality of innovation and always pushing to overcome obstacles. 

This experience also highlighted the dynamic nature of Descope’s platform. This can be seen through the versatile use of Descope Flows throughout the new escape room. Working on this project has made me more excited about my remaining time at Descope because the company has fostered a culture where ideas flourish and every contribution, even something like improving an escape room hiring challenge, can make a significant impact on its growth and success.