<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Clerk.dev</title>
    <description>The latest articles on Forem by Clerk.dev (@authentication).</description>
    <link>https://forem.com/authentication</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F655957%2F5e7cc96f-4bcc-4fc4-9888-d1fcf4512553.jpg</url>
      <title>Forem: Clerk.dev</title>
      <link>https://forem.com/authentication</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/authentication"/>
    <language>en</language>
    <item>
      <title>History and Rise of "Passwordless"</title>
      <dc:creator>Clerk.dev</dc:creator>
      <pubDate>Fri, 01 Oct 2021 00:15:20 +0000</pubDate>
      <link>https://forem.com/clerk/history-and-rise-of-passwordless-3ndl</link>
      <guid>https://forem.com/clerk/history-and-rise-of-passwordless-3ndl</guid>
      <description>&lt;p&gt;&lt;strong&gt;A Brief History of Passwordless&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Passwords have been our main digital authentication method since 1961, though its &lt;a href="https://itd.sog.unc.edu/knowledge-base/article/hacking-hacked-password-security-digital-age"&gt;vulnerability to hacking&lt;/a&gt; was demonstrated within one year.&lt;/p&gt;

&lt;p&gt;Encrypted password storage and public-key cryptography were developed in the late 60s to early 70s.&lt;/p&gt;

&lt;p&gt;But the 1980s brought the first version of "passwordless" authentication. This came in the form of dynamic, one-time passwords (OTP) held on physical fobs.&lt;/p&gt;

&lt;p&gt;OTPs eventually developed into two protocols: time-based OTPs (TOTP) and cryptographed hash-based message authentication codes or HMAC OTPs (HOTP). Dynamic OTPs are still widely used as an authentication protocol.&lt;/p&gt;

&lt;p&gt;The late 1990s brought single sign-on (SSO) into use. SSO helped organizations manage user authentication across an entire network of applications. However, fobs and other hardware tokens remained in use and popular throughout the 1990s and 2000s.&lt;/p&gt;

&lt;p&gt;Smart cards are one hardware token that emerged in the early 2000s. These physical electronic authorization cards are sometimes used as passwordless &lt;a href="https://en.wikipedia.org/wiki/Smart_card#Computer_security"&gt;security tokens&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The 2000s also saw the combination of these various passwordless and password-based authentication methodologies with the rise of &lt;em&gt;multifactor&lt;/em&gt; authentication. AT&amp;amp;T actually holds the earliest recognized patent dating to 1998, but multi-factor auth (MFA) and single sign-on (SS0) really took off when organizations like Google began building them into their applications as a form of password-independent authentication.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.computerworld.com/article/2512642/banks-may-soon-require-new-online-authentication-steps.html"&gt;financial sector&lt;/a&gt; adjusted quickly. In 2005, the Federal Financial Institutions Examination Council (FFIEC) set out new user authentication guidelines. These included multi-factor authentication, biometrics, OTPs, and token-based authentication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Passwordless was popularized&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As MFA and thus passwordless authentication strategies became more popular, passwords and authentication itself became a popular topic again.&lt;/p&gt;

&lt;p&gt;The first sign of media interest was at a &lt;a href="https://news.microsoft.com/2004/02/24/gates-details-security-related-technology-investments-and-innovationsat-rsa-conference-2004/"&gt;2004 IT security conference&lt;/a&gt;, where Bill Gates publicly advocated for making passwords obsolete. Gates went over several of the security threats inherent to knowledge-based passwords. He then advocated for newer authentication technologies, including a tamper-resistant biometric ID card.&lt;/p&gt;

&lt;p&gt;In late 2011, IBM &lt;a href="https://www.networkworld.com/article/2184221/ibm-predicts-five-big-technologies-of-the-future.html"&gt;predicted&lt;/a&gt; that "multi-factor biometrics" would become the dominant authentication protocol, creating a completely passwordless world. Their influential thought leadership spawned many other predictions and thought pieces.&lt;/p&gt;

&lt;p&gt;Google pushed things further in 2013, when &lt;a href="https://www.computer.org/csdl/magazine/sp/2013/01/msp2013010015/13rRUx0xPgv"&gt;Eric Grosse, VP of security engineering, stated&lt;/a&gt; that "passwords and simple bearer tokens, such as cookies, are no longer sufficient to keep users safe." The company then made multi-factor authentication protocols standard within the organization, and that same year, Google's information security manager, Heather Adkins, put it bluntly, "Passwords are done at Google."&lt;/p&gt;

&lt;p&gt;Then in 2014, after Russian hackers &lt;a href="https://www.computerworld.com/article/2490980/russian-credential-theft-shows-why-the-password-is-dead.html"&gt;accessed the login credentials&lt;/a&gt; for over 1.2 billion internet users, Avivah Litan, VP Analyst at Gartner, reiterated the need to go passwordless. In her words, "Passwords were dead a few years ago. Now they are more than dead."&lt;/p&gt;

&lt;p&gt;Finally, the rise of mobile has boosted the popularity of passwordless authentication. In 2013, Apple &lt;a href="https://www.wired.com/insights/2014/10/go-ahead-and-touch-id/"&gt;introduced Touch ID&lt;/a&gt; (and Face ID has since followed) making passwordless biometric authentication ubiquitous today. Additionally, passwordless strategies (i.e. sending an SMS-based magic-link) allowed mobile-first businesses, like Uber and Lyft, to authenticate users and perform account verification in a single easy step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is "Passwordless" here to stay?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There is no doubt that authentication technology and methodology will continue to evolve. The number of viable authentication methods will continue to grow, and inherently, most of these will be a passwordless one. Since two-factor and multi-factor authentication are widely popular (and in many use-cases a requirement), passwordless is definitely here to stay.&lt;/p&gt;

&lt;p&gt;However, this doesn't mean that password-based methods will be completely replaced or that passwordless is right for everyone. To learn more about specific passwordless technologies and if they're the right choice for you, keep reading our series on passwordless authentication.&lt;/p&gt;

</description>
      <category>authentication</category>
      <category>security</category>
      <category>passwordless</category>
      <category>startup</category>
    </item>
    <item>
      <title>Passwordless 101</title>
      <dc:creator>Clerk.dev</dc:creator>
      <pubDate>Fri, 01 Oct 2021 00:09:28 +0000</pubDate>
      <link>https://forem.com/clerk/passwordless-101-542c</link>
      <guid>https://forem.com/clerk/passwordless-101-542c</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Passwordless Authentication?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Passwordless authentication is exactly what it sounds like: an authentication strategy to verify user identity without the need for the user to manually enter knowledge-based information.&lt;/p&gt;

&lt;p&gt;As we outlined in the previous article in this series, passwordless methodologies have been in use since the 1980's, but were ultimately popularized in the 2000's as multi-factor authentication (MFA) and single sign-on (SSO) became standards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;From MFA and SSO to 'passwordless'&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multi-factor authentication requires users to provide multiple unique ways of identifying themselves, which can include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Something the user knows, like an ID number, user name, and/or password&lt;/li&gt;
&lt;li&gt;  Something the user has, like a token, authenticator app, ubikey, email address, or phone number&lt;/li&gt;
&lt;li&gt;  Something that's part of the user, like facial recognition, finger print, or voice print&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With single sign-on, a third party verifies the identity of a user, relieving sites and applications of the burden of storing and tracking credentials. When users log into a website, it checks with an SSO provider to confirm if they've already verified.&lt;/p&gt;

&lt;p&gt;SSO and most of the MFA methods described above do not require the user to manually enter any information, and are thus, "passwordless".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Passwordless Authentication methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Below is a brief overview of some of the most popular passwordless authentication methods.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Social sign-up: Social sign-up means a user is authenticated via an existing third-party, pre-verified account (e.g., Google, Facebook, Twitter). Most businesses see over 50% of users opt for social sign-in when offered, and sign-ins completed 35% faster than password users. B2C companies may do better with social sign-in options, &lt;a href="https://cxl.com/blog/social-login/"&gt;especially those with a younger audience&lt;/a&gt; (e.g., under 50). However, some B2B companies may still benefit from social options. For instance, &lt;a href="https://cxl.com/blog/social-login/"&gt;Mailchimp saw a 66% drop in failed login attempts&lt;/a&gt; after implementing social sign-ins, though only 3.4% of their users chose to use it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security Assertion Markup Language (SAML): SAML means a user can use one set of credentials on various apps, which the service provider stores. This is most common in enterprise environments, like with Microsoft products. IT teams for large companies appreciate the lightened load of support tickets when only global sign-on is required.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Magic link: &lt;a href="https://slack.com/intl/en-pk/help/articles/212681477-Sign-in-to-Slack"&gt;Slack&lt;/a&gt; is probably the most well-known user of the Magic link, which sends an authorized URL to a unique user's email address or phone number to log in. Methods like a magic link have to play nicely with email providers, though, or they may end up in spam.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One-time passwords by SMS or email: This authentication method prompts users from their device or email to enter a unique code for signing on. Tech companies are making it easier to do this, like &lt;a href="https://support.apple.com/guide/iphone/automatically-fill-in-sms-passcodes-on-iphone-iphc89a3a3af/ios"&gt;iPhone's ability to paste passcodes from SMS&lt;/a&gt;. 2FA using a one-time password authentication is a common strategy for financial institutions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;WebAuthn: &lt;a href="https://webauthn.guide/"&gt;Web authentication (or WebAuthn)&lt;/a&gt; uses public-key cryptography instead of password-based credentials to create a keypair for the specific user. The encryption needs the private key for the public key and vice versa, so it's harder to unlock. The downside is it's &lt;a href="https://sec.okta.com/articles/2020/04/webauthn-great-and-it-sucks"&gt;not completely user-friendly&lt;/a&gt;, and browsers don't use the same terminology.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Time-based one-time password (TOTP): This 2FA method uses time as part of the unique identifying authentication criteria. The time-sensitive unique code is then sent via SMS or directly to a browser. The &lt;a href="https://apps.apple.com/us/app/totp-authenticator-pro-2fa/id1404230533"&gt;TOTP Authenticator app&lt;/a&gt; is easy for users to set up and use for websites or apps and has an added layer of password protection.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The YubiKey: Yubico's hardware-based "strong two-factor authentication" option called &lt;a href="https://www.yubico.com/"&gt;YubiKey&lt;/a&gt; looks like your average USB device but packs a big security punch. This tangible option provides device-generated and password storage instead of relying on system or software solutions. Businesses may opt for the YubiKey to prevent phishing and create a similar authentication strategy for their teams.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Biometric: Think of your smartphone or spy movies (e.g., Face ID, Touch ID, eyeball scan). Small companies typically don't need biometric identification because they're expensive and unnecessary; however, this option is on the rise in the passwordless security landscape.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;A Few Caveats for Passwordless Authentication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One drawback with passwordless authentication is that it doesn't truly exist yet. Even sophisticated authentication workflows will require the use of a password at some point. Also, passwords and credentials still need to be used as a backup, failsafe, or initial verification method.&lt;/p&gt;

&lt;p&gt;Aside from this, every authentication protocol has its own disadvantages, for example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Hardware fobs and physical tokens can be hard to implement&lt;/li&gt;
&lt;li&gt;  Security hardware can be left incompatible with various software after updates&lt;/li&gt;
&lt;li&gt;  Email accounts &lt;a href="https://www.viget.com/articles/email-is-completely-insecure-by-default/"&gt;are not necessarily secure&lt;/a&gt; and phone numbers can be spoofed&lt;/li&gt;
&lt;li&gt;  Social network accounts can be compromised&lt;/li&gt;
&lt;li&gt;  Device-dependent biometrics can be useless if a device is lost or stolen&lt;/li&gt;
&lt;li&gt;  SMS security protocols are outdated, leaving these communications &lt;a href="https://www.vice.com/en/article/y3g8wb/hacker-got-my-texts-16-dollars-sakari-netnumber"&gt;vulnerable&lt;/a&gt; and unprotected&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>passwordless</category>
      <category>authentication</category>
      <category>todayilearned</category>
      <category>security</category>
    </item>
    <item>
      <title>Session management: What it is and why your security depends on it</title>
      <dc:creator>Clerk.dev</dc:creator>
      <pubDate>Mon, 20 Sep 2021 22:52:57 +0000</pubDate>
      <link>https://forem.com/clerk/session-management-what-it-is-and-why-your-security-depends-on-it-5e6</link>
      <guid>https://forem.com/clerk/session-management-what-it-is-and-why-your-security-depends-on-it-5e6</guid>
      <description>&lt;p&gt;Constantly having to log back in to your online accounts is a frequent annoyance - but this irritating problem stems from an inefficient solution to a genuine security concern.&lt;/p&gt;

&lt;p&gt;Web applications need to make sure that your accounts are safe from hackers, and some handle that by requiring frequent re-authentication. Still, that's not the best solution. Proper session management can help apps like yours keep users safe *without *needing to constantly log back in.&lt;/p&gt;

&lt;p&gt;Below, we'll cover the fundamentals of session management, what's required to implement it, and how it can help you keep your users safe without creating a frustrating user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is session management?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.packetlabs.net/session-management/"&gt;Session management&lt;/a&gt; is the process of facilitating private interactions between users and web applications. It specifically refers to managing different "sessions," or periods when the user is logged in and active in the application. The session management process lets users access their unique and potentially sensitive information securely without letting others get into their account, without forcing users to constantly re-authenticate.&lt;/p&gt;

&lt;p&gt;Session management can take two forms: short-lived and long-lived. Short-lived sessions last only as long as the user remains in the application. Every time they leave the app, they need to re-authenticate to get back in.&lt;/p&gt;

&lt;p&gt;Long-lived sessions keep the user logged in to the app even if they leave. These sessions store session IDs on the user's device, allowing them to reopen the app and start using it without needing to re-authenticate.&lt;/p&gt;

&lt;p&gt;Long-lived sessions typically offer the best user experience, since they let people get into their accounts with no hassle. But this approach also has drawbacks. Anyone who accesses the device can also access that account as long as the session is still active, which is a security risk. For apps that contain sensitive information, short-lived sessions may make the user experience slightly more complicated, but will be more secure.&lt;/p&gt;

&lt;p&gt;‌&lt;/p&gt;

&lt;h2&gt;
  
  
  The elements of session management implementation
&lt;/h2&gt;

&lt;p&gt;Proper session management implementation involves three functions: creating session IDs, storing session cookies or tokens, and enforcing session expiry dates.&lt;/p&gt;

&lt;p&gt;Here's what that means:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session IDs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When the user first logs into the website or app, the server creates a unique session ID associated with the authenticated user. However, with each new request, the server still needs a way of identifying if the request came from that authenticated user without needing re-authentication. Which is where cookies or &lt;a href="https://en.wikipedia.org/wiki/JSON_Web_Token"&gt;JWT&lt;/a&gt; tokens come in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session cookies vs. tokens&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When the server creates a unique session ID, it also creates a cookie that is stored in the user's browser. The information contained in that cookie is sent along with each new request so the server understands it comes from the same authenticated user.&lt;/p&gt;

&lt;p&gt;Session cookies are most commonly used with websites or web-based platforms. When it comes to modern web applications, a JSON Web Token, or JWT, is used instead.&lt;/p&gt;

&lt;p&gt;When the user logs on with the right credentials, a JWT is created instead of a session ID and sends it to the user. The JWT is stored in local storage and the header of the token is sent with every new request.&lt;/p&gt;

&lt;p&gt;This means that the user's state is not stored on the server, but inside the token, making this option more scalable and more useful for mobile device authentication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session expiry&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sessions are temporary states and expire under certain circumstances, such as the mobile app being closed, a set period of inactivity, or a maximum session duration that cannot be exceeded. Long-lived sessions may expire when the user hasn't interacted with the app in a certain number of days or weeks. The cookie or token storing the session ID should automatically delete itself at the end of those periods.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security concerns addressed by well implemented session management
&lt;/h2&gt;

&lt;p&gt;The purpose of session management is to help keep user data secure. Without appropriate session management, you can run into several security problems, putting your users at risk. Common vulnerabilities caused by a lack of or poorly implemented session management include:&lt;/p&gt;

&lt;p&gt;‌&lt;strong&gt;Session hijacking&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The cookies that you use to store session IDs need to be truly secure. Insecure session cookies are easy for hackers to predict or to use for brute-force attacks. If a hacker can spoof your users' session IDs, they can impersonate users and take over their accounts. This is known as session hijacking, and it can lead to the loss of sensitive information connected to the account.&lt;/p&gt;

&lt;p&gt;‌&lt;strong&gt;Session fixation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If a specific session token can be used across platforms and without proper expiry protocols, it can be "fixated" by hackers. Essentially, the hacker tricks a user into logging in with a specific session ID, often by adding to the session ID in the URL argument, and then uses those credentials to log in to the user's account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Session resources&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Session management systems should beare resource-light, so that attacks, such as denial of service (DDoS) that flood the system with new session requests, don't consume huge amounts of resources.&lt;/p&gt;

&lt;p&gt;‌&lt;strong&gt;Anomaly detection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every application runs the risk of hacking attempts. If your session management tool doesn't have a way to detect abnormal patterns like brute force session ID guessing or DDoS attacks, you're more likely to fall victim to these attacks.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;‌_Session expiry unset or too long&lt;/em&gt;_&lt;/p&gt;

&lt;p&gt;Session expiration has two potential problems. If you don't set the timeout period, many programs may leave the cookie or token on the device forever, leaving the account vulnerable to anyone else with the device. Also, a set timeout period that's too long has the same issue.&lt;/p&gt;

&lt;p&gt;‌&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay secure with session management
&lt;/h2&gt;

&lt;p&gt;‌Proper session management addresses all these concerns. It keeps your users and accounts safe by providing secure cookies or tokens, setting appropriate protocols and timeouts, and implementing anomaly detection.‌&lt;/p&gt;

&lt;p&gt;Session management is a fundamental part of running a secure, trustworthy web application. By keeping a handle on your users' sessions, you can help them avoid the hassle of constant re-authentication without putting them at risk.&lt;/p&gt;

&lt;p&gt;You can address all your session management needs by implementing a &lt;a href="https://clerk.dev/"&gt;user management&lt;/a&gt; service, or you can write your own. Either way, your users will thank you for protecting them without making their lives more difficult.&lt;/p&gt;

</description>
      <category>security</category>
      <category>authentication</category>
      <category>jamstack</category>
      <category>nextjs</category>
    </item>
    <item>
      <title>Don’t underestimate the value of a secure, seamless ‘forgot password’ flow</title>
      <dc:creator>Clerk.dev</dc:creator>
      <pubDate>Thu, 16 Sep 2021 22:03:59 +0000</pubDate>
      <link>https://forem.com/clerk/don-t-underestimate-the-value-of-a-secure-seamless-forgot-password-flow-5b5a</link>
      <guid>https://forem.com/clerk/don-t-underestimate-the-value-of-a-secure-seamless-forgot-password-flow-5b5a</guid>
      <description>&lt;p&gt;Just about every software application today relies on individual user accounts to provide people with a personalized and private experience. However, as &lt;a href="https://a16z.com/2011/08/20/why-software-is-eating-the-world/"&gt;"software eats the world,"&lt;/a&gt; the average user is managing an increasing number of accounts. Practically every online store, social media platform, SaaS product, newsletter, game, and group requires users to create an online account with a username and password. The average American adult has a total of &lt;a href="https://blog.dashlane.com/wp-content/uploads/2015/07/MailboxSecurity_infographic_EN_final1.jpg"&gt;130 online accounts&lt;/a&gt; --- and they all need to be kept secure, which exacerbates an already all-too-common problem: lost and forgotten passwords.&lt;/p&gt;

&lt;p&gt;That's why most apps offer password reset flows. This essential workflow allows users to reclaim their accounts while maintaining their security and privacy. Keep reading to learn about "forgot password" flows, how they work, and the best practices to keep in mind.&lt;/p&gt;

&lt;p&gt;‌&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a 'forgot password' flow?
&lt;/h2&gt;

&lt;p&gt;If you've ever had to reset a password, you've gone through a "forgot password" flow. Users go through this self-service process to reset their passwords and reclaim their accounts. Any website, app, or other account that relies on passwords for security should have some kind of reset flow.&lt;/p&gt;

&lt;p&gt;‌Why? Because users are prone to forgetting their passwords. It's also common for people to forget their accounts entirely or change devices and lose their saved passwords. Without some way for users to quickly and easily reset passwords and reclaim accounts, you may lose users, have to support multiple accounts for the same user, and/or deal with an overwhelming number of "forgot password" support requests.&lt;/p&gt;

&lt;p&gt;‌&lt;/p&gt;

&lt;h2&gt;
  
  
  How 'forgot password' flows work
&lt;/h2&gt;

&lt;p&gt;Password resets can be manual or automatic. Manual resets rely on the user reaching out to support by email or phone. The support team member asks them some kind of security or verification questions and resets their password accordingly. However, manual flows mean that a significant percentage of your support tickets will be password resets, taking up your staff's valuable time. Additionally, manual verification is often less secure than an automated process, and can be especially frustrating for a user that needs access quickly.&lt;/p&gt;

&lt;p&gt;‌The alternative is to implement a &lt;a href="https://www.hcinnovationgroup.com/home/article/13005329/password-resetting-goes-the-selfservice-route"&gt;self-service password reset&lt;/a&gt; (SSPR) process. These automated workflows allow users to reset their passwords or reclaim their accounts without human intervention. They're used by most websites, apps, and other password-protected systems to streamline the security process. Your support staff won't need to spend time answering password reset claims and can focus on more important work.&lt;/p&gt;

&lt;p&gt;Each type of self-service flow works a little differently. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Temporary passwords: This process will send the user a temporary password that they can use to access the system. The user then resets their password themselves once they're logged in.&lt;/li&gt;
&lt;li&gt;  ‌Email verification: The system emails the user a link at their primary email address, and the link takes them to a dedicated password reset page.&lt;/li&gt;
&lt;li&gt;  ‌SMS verification: The system sends the user a text to confirm they want to reset their password, with instructions to follow the reset link.&lt;/li&gt;
&lt;li&gt;  ‌Passwordless logins: Passwordless flows send a one-time link to the user's email or phone, allowing them to log in without resetting their password at all. This can be great for a user that just wants to log in from a different device one time, or is pressed for time and wants to reset their password later on&lt;/li&gt;
&lt;li&gt;  ‌Two-factor authentication (2FA) reset: Two methods are used instead of one to confirm the reset. The user confirms their identity one way and then resets their password with another method. The system may have them check their email or phone for the reset link, and then on the reset page, it may ask for a code that was sent to their phone or a sign-in authentication app.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‌&lt;/p&gt;

&lt;h2&gt;
  
  
  Why implementing SSPR workflows can be challenging
&lt;/h2&gt;

&lt;p&gt;While password reset systems are essential, they can be a complex feature to implement on your own. Rolling your own password reset process means dealing with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  The constant evolution of best practices. &lt;a href="https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Forgot_Password_Cheat_Sheet.md"&gt;Best practices&lt;/a&gt; regarding SSPR workflows are constantly evolving - from manual reset to security questions to email reset to SMS workflows to passwordless logins. You should keep up with these changes to make sure your password reset process stays secure and up-to-date.&lt;/li&gt;
&lt;li&gt;  ‌Security maintenance. Password resets need to be a secure workflow end-to-end, or your users' accounts are at risk of being hacked. If you write your own, designing a secure process is your responsibility.&lt;/li&gt;
&lt;li&gt;  ‌Design and integration. Your reset process might be technically sound, but it should also be frictionless and well-designed, as an &lt;a href="http://www.prweb.com/releases/2012/1/prweb9086226.htm"&gt;easy sign in experience is critical to retention&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;  Complexity. Adding more authentication features and options can provide an excellent user experience when everything works right, but it also creates the potential for more "edge cases" where problems occur.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;‌‌‌&lt;/p&gt;

&lt;h2&gt;
  
  
  Get started with password resets today
&lt;/h2&gt;

&lt;p&gt;If your team has more pressing features to focus on than creating a password recovery flow, &lt;a href="https://clerk.dev/"&gt;Clerk&lt;/a&gt; can eliminate the guesswork (and real work) of user management and authentication. Clerk makes it easy to add complete user management to your app in minutes today, while allowing you to easily make changes and add new features in the future.&lt;/p&gt;

</description>
      <category>password</category>
      <category>reset</category>
      <category>sspr</category>
      <category>security</category>
    </item>
    <item>
      <title>Meet our Gatsby plugin</title>
      <dc:creator>Clerk.dev</dc:creator>
      <pubDate>Wed, 15 Sep 2021 16:53:19 +0000</pubDate>
      <link>https://forem.com/clerk/meet-our-gatsby-plugin-2pj1</link>
      <guid>https://forem.com/clerk/meet-our-gatsby-plugin-2pj1</guid>
      <description>&lt;p&gt;Learn how to add authentication and user management to your Gatsby app with Clerk.&lt;/p&gt;

&lt;p&gt;At Clerk, our mission is to empower every developer to easily add authentication and user management to their apps.&lt;/p&gt;

&lt;p&gt;We know it's hard to keep up with all the exciting new options out there, so we strive to create more tools and integrations, so you, the developer, can spend more time building what really matters: your app.&lt;/p&gt;

&lt;p&gt;With that in mind, we're happy to announce our &lt;code&gt;gatsby-plugin-clerk&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;The plugin wraps our &lt;code&gt;ClerkProvider&lt;/code&gt; component around the entire Gatsby app.&lt;/p&gt;

&lt;p&gt;This has two benefits: keeping the layout component cleaner while grouping all the configuration in &lt;code&gt;gatsby-config.js&lt;/code&gt;, alongside other plugins.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to use it
&lt;/h2&gt;

&lt;p&gt;First and foremost, install the necessary packages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;yarn add gatsby-plugin-clerk @clerk/clerk-react

&lt;span class="c"&gt;# or&lt;/span&gt;

npm &lt;span class="nb"&gt;install &lt;/span&gt;gatsby-plugin-clerk @clerk/clerk-react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's configure the plugin on &lt;code&gt;gatsby-config.js.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For this step, you'll need the &lt;code&gt;frontendApi&lt;/code&gt; key of your Clerk application. To find it, go to your &lt;a href="https://dashboard.clerk.dev/"&gt;dashboard&lt;/a&gt;, choose the application and the instance you're working on, and locate the key on the Home tab.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// gatsby-config.js&lt;/span&gt;

&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gatsby-plugin-clerk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;// OBS: Don't push your frontend API key to version control.&lt;/span&gt;
                &lt;span class="c1"&gt;// A safer approach is to set it as an environment variable for each environment your app will run in.&lt;/span&gt;
                &lt;span class="na"&gt;frontendApi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;YOUR_FRONTEND_API_KEY&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From here onwards, everything should work just the same. You can start using components like &lt;code&gt;SignedIn&lt;/code&gt; and &lt;code&gt;SignedOut&lt;/code&gt; from the root of your app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/pages/index.js&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt;  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SignIn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;SignedIn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;SignedOut&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;UserButton&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@clerk/clerk-react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;IndexPage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt;  &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SignedIn&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;UserButton&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SignedIn&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SignedOut&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SignIn&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;SignedOut&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;IndexPage&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it, in just a few steps, we added easy and secure authentication with beautiful and complete user management to your Gatsby app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus: Clerk + Gatsby starter
&lt;/h2&gt;

&lt;p&gt;To make it even easier for you, we went ahead and created a &lt;a href="https://github.com/clerkinc/clerk-gatsby-starter"&gt;Clerk + Gatsby starter repository&lt;/a&gt;. It has Clerk integrated with &lt;a href="https://github.com/gatsbyjs/gatsby-starter-default"&gt;Gatsby's default starter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Inside &lt;code&gt;src/api&lt;/code&gt; you can also find the new Gatsby Functions in action. We added a couple of examples there, so you know how to use Gatsby's serverless functions with Clerk's backend API.&lt;/p&gt;

&lt;p&gt;Fork it, clone it and build it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus 2: Deploy the starter on Gatsby Cloud
&lt;/h2&gt;

&lt;p&gt;Ok, we owe this one to the Gatsby team. They did a great job in building a super easy deployment flow.&lt;/p&gt;

&lt;p&gt;So, if you want to deploy the &lt;a href="https://github.com/clerkinc/clerk-gatsby-starter"&gt;Clerk + Gatsby starter&lt;/a&gt; on Gatsby Cloud, just click &lt;a href="https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/clerkinc/clerk-gatsby-starter"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once there, you can configure a number of things, like the Gatsby Cloud workspace the project should live in, the repository name that will be created in your GitHub account, and even add more integrations.&lt;/p&gt;

&lt;p&gt;But here's the one thing you can't forget: your need to add your environment variables, like in the image below. If you don't know where to find them, check the &lt;a href="https://github.com/clerkinc/clerk-gatsby-starter/blob/main/README.md"&gt;README&lt;/a&gt; file of this starter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XQaw2FNe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://clerk.dev/_next/image%3Furl%3Dhttps%253A%252F%252Fcdn.sanity.io%252Fimages%252Fe1ql88v4%252Fproduction%252F37292ec19825df500deddefc4a6d70f7c3a52a72-1782x928.png%253Ffit%253Dmax%2526auto%253Dformat%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XQaw2FNe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://clerk.dev/_next/image%3Furl%3Dhttps%253A%252F%252Fcdn.sanity.io%252Fimages%252Fe1ql88v4%252Fproduction%252F37292ec19825df500deddefc4a6d70f7c3a52a72-1782x928.png%253Ffit%253Dmax%2526auto%253Dformat%26w%3D1920%26q%3D75" alt="Gatsby Environment Variables" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you're done, head over to your GitHub account, find the newly created repository, clone it and start building.&lt;/p&gt;

&lt;p&gt;And just like this, you can use all the benefits and performance that Gatsby Cloud provides to Gatsby apps.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you encounter a permissions error while doing the steps above, here's what's happening: Gatsby Cloud requires permissions to create and manage future repositories on your GitHub account in order to create a new repository for you.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;To fix it, go to your &lt;a href="https://github.com/settings/installations"&gt;GitHub installations page&lt;/a&gt;, and configure Gatsby Cloud as such:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4TzPZqDA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://clerk.dev/_next/image%3Furl%3Dhttps%253A%252F%252Fcdn.sanity.io%252Fimages%252Fe1ql88v4%252Fproduction%252F12c63a17a9f99acbc4fa4a623c613da79efac314-1498x546.png%253Ffit%253Dmax%2526auto%253Dformat%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4TzPZqDA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://clerk.dev/_next/image%3Furl%3Dhttps%253A%252F%252Fcdn.sanity.io%252Fimages%252Fe1ql88v4%252Fproduction%252F12c63a17a9f99acbc4fa4a623c613da79efac314-1498x546.png%253Ffit%253Dmax%2526auto%253Dformat%26w%3D1920%26q%3D75" alt="Repo Access" width="800" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Need help?
&lt;/h2&gt;

&lt;p&gt;If you're unfamiliar with how our prebuilt UI components or other details described in the guide work, you can always go to our &lt;a href="https://docs.clerk.dev/"&gt;documentation&lt;/a&gt; to find out more or reach out to us on our &lt;a href="https://discord.gg/YRHz4h4whV"&gt;Discord&lt;/a&gt; server.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>gatsby</category>
      <category>clerk</category>
      <category>auth</category>
      <category>react</category>
    </item>
    <item>
      <title>Designing fast sign in forms— diving into the data</title>
      <dc:creator>Clerk.dev</dc:creator>
      <pubDate>Fri, 02 Jul 2021 16:12:48 +0000</pubDate>
      <link>https://forem.com/clerk/designing-fast-sign-in-forms-diving-into-the-data-587j</link>
      <guid>https://forem.com/clerk/designing-fast-sign-in-forms-diving-into-the-data-587j</guid>
      <description>&lt;p&gt;The modern web is obsessed with speed. Just this week, Vercel &lt;a href="https://nextjs.org/blog/next-11"&gt;launched Next.js 11&lt;/a&gt; with a special focus on &lt;a href="https://web.dev/vitals/"&gt;Core Web Vitals&lt;/a&gt;, a new set Google metrics that are measured in tens of milliseconds to determine page speed. Google has noticed that faster websites mean better user experiences, and has incorporated these metrics into their search ranking algorithms.&lt;/p&gt;

&lt;p&gt;At &lt;a href="https://clerk.dev/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=crossposting"&gt;Clerk&lt;/a&gt;, we're focused on a speed challenge that's equally important but often neglected: &lt;strong&gt;how quickly can users sign in?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In working to optimize our prebuilt Sign In UI, we've learned a few surprising lessons we thought are worth sharing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Social Sign In deserves the top spot
&lt;/h2&gt;

&lt;p&gt;After much qualitative debate - &lt;a href="https://clerk.dev/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=crossposting"&gt;Clerk&lt;/a&gt; originally launched with Google and Facebook sign in buttons &lt;em&gt;below&lt;/em&gt; the option to sign in by email.  &lt;/p&gt;

&lt;p&gt;After collecting a few months of data, we realized we should make an adjustment.  There was a near 50/50 split of users who preferred Social Sign In vs email and password.  But, Social Sign In was also faster: ~5 seconds on average compared to ~8 seconds for email and password. So we made the switch:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CABmlhQx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1625242049132/EeJkSYpP9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CABmlhQx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1625242049132/EeJkSYpP9.png" alt="Email.png" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the months since making this change, Social Sign In usage has started to outpace email and password, with the last month seeing a 52/48 split.&lt;/p&gt;

&lt;p&gt;As expected, since more users are now using a faster authentication strategy, that shift has also resulted in a faster overall speed of Sign In.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passwordless should remain a fallback
&lt;/h2&gt;

&lt;p&gt;The passwordless concept has existed in authentication systems for decades.  If a user forgets their password, a code or link sent to their email address can be used to authenticate instead.&lt;/p&gt;

&lt;p&gt;Recently, there has been a lot of buzz about promoting passwordless flows to the primary authentication mechanism.  While we allow developers to configure &lt;a href="https://clerk.dev/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=crossposting"&gt;Clerk&lt;/a&gt; in this manner, we recommend against it, and instead suggest leaving it as a fallback.&lt;/p&gt;

&lt;p&gt;On average, we see passwordless flows take ~35 seconds to complete.  Despite using Sendgrid to deliver our emails quickly and with high inbox rates, the process of checking email is just &lt;em&gt;slow&lt;/em&gt; in comparison to Social Sign In or email and password.&lt;/p&gt;

&lt;h2&gt;
  
  
  The "edge cases" of Social Sign In are surprisingly common
&lt;/h2&gt;

&lt;p&gt;While building &lt;a href="https://clerk.dev/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=crossposting"&gt;Clerk&lt;/a&gt;, we cataloged any frustrating user experiences we encountered across the web and made sure to fix them. The source of many screenshots was Social Sign In - even among the web's biggest properties, it's common to stop users from using a Social Sign In if they didn't originally Sign Up that way:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WkuPBY1s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1625242087389/RXkz9mzeU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WkuPBY1s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.hashnode.com/res/hashnode/image/upload/v1625242087389/RXkz9mzeU.png" alt="ebayspotifyexamples.png" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While it's obvious that roadblocks like these slow the sign in process, handling them elegantly takes a lot of development time. Many developers are comfortable pushing off a proper solution because these scenarios feel like edge cases.&lt;/p&gt;

&lt;p&gt;In practice, we've learned that these "edge cases" are surprisingly common. In fact, 15.9% of users who have used Social Sign In have also used another method. Of those:&lt;/p&gt;

&lt;p&gt;2 in 3 originally signed up with a password then later chose Social Sign In&lt;br&gt;
1 in 3 originally signed up with Social Sign In, then later tried signed in without (they were sent a code to their email)&lt;br&gt;
At Clerk, we've invested heavily in handling these scenarios as elegantly and quickly as possible. Regardless of a user's choice of sign in strategy, they will always be linked to the same underlying account.&lt;/p&gt;

&lt;p&gt;Clerk's prebuilt Sign In UI&lt;br&gt;
Clerk enables developers to add beautiful, high-conversion Sign In form to their application in minutes. Our prebuilt UI can easily be themed to match any company's brand and style guidelines.&lt;/p&gt;

&lt;p&gt;We're constantly analyzing the data in search of better user experiences, as well as evaluating new technologies for addition to our product. If you have questions or ideas for improvement, reach out to us on Twitter &lt;a href="https://twitter.com/ClerkDev"&gt;@ClerkDev&lt;/a&gt;, or through &lt;a href="https://clerk.dev/support?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=crossposting"&gt;support&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This article was originally published on &lt;a href="https://clerk.dev/blog/designing-fast-sign-in-forms?utmsource=devto&amp;amp;utmmedium=blog&amp;amp;utmcampaign=crossposting"&gt;Clerk.dev&lt;/a&gt; by Colin Sidoti, CEO and Co-Founder of Clerk.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>authentication</category>
      <category>authorization</category>
      <category>oauth</category>
      <category>passwordless</category>
    </item>
    <item>
      <title>How we use End To End tests to bulletproof our authentication flows across browsers</title>
      <dc:creator>Clerk.dev</dc:creator>
      <pubDate>Mon, 28 Jun 2021 10:37:07 +0000</pubDate>
      <link>https://forem.com/clerk/how-we-use-end-to-end-tests-to-bulletproof-our-authentication-flows-across-browsers-4ib6</link>
      <guid>https://forem.com/clerk/how-we-use-end-to-end-tests-to-bulletproof-our-authentication-flows-across-browsers-4ib6</guid>
      <description>&lt;p&gt;In recent years, End To End testing has become a regular topic of discussion in small team environments. The main reasons for this are the evolution of tooling and the need to shift towards high velocity product development. At &lt;a href="https://www.clerk.dev/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=e2e" rel="noopener noreferrer"&gt;Clerk&lt;/a&gt; , we use End To End testing to create bulletproof authentication flows across browsers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 10,000 ft view of the End To End landscape
&lt;/h2&gt;

&lt;p&gt;In the past, End To End testing was almost exclusively considered a Quality Assurance Engineering topic. For one reason or another, the development of test automation pipelines and application workflow validation tests were not so popular with software engineers.&lt;/p&gt;

&lt;p&gt;That view has gradually become dated and replaced with the growing popularity of tools like Cypress, Puppeteer, Playwright, and even the latest version of Selenium.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1623935386044%2FeYrDAqWih.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1623935386044%2FeYrDAqWih.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The growth of those tools should not be seen as a simple technical advancement, but instead as an immediate answer to the growing need to efficiently and effectively validate fast moving development cycles of agile teams. At &lt;a href="https://www.clerk.dev/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=e2e" rel="noopener noreferrer"&gt;Clerk&lt;/a&gt; we deploy multiple times per day, and without these tools it would be impossible to ensure reliability.&lt;/p&gt;

&lt;h2&gt;
  
  
  The high bar for reliability at Clerk
&lt;/h2&gt;

&lt;p&gt;As a solution for authentication and user management, &lt;a href="https://www.clerk.dev/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=e2e" rel="noopener noreferrer"&gt;Clerk&lt;/a&gt; must maintain exceptionally high reliability, even as our product and team expands rapidly around our core offering. It is critical that end-users can always access their accounts quickly, even through edge cases like originally signing up with Google, then trying to sign in with email instead.&lt;/p&gt;

&lt;p&gt;We also take great pride in our developer experience, and often jump through hoops to ensure that &lt;a href="https://www.clerk.dev/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=e2e" rel="noopener noreferrer"&gt;Clerk&lt;/a&gt; works consistently across development, staging, and production environments and across all browsers.&lt;/p&gt;

&lt;p&gt;To keep reliability high across our myriad of flows - and importantly, to give our own development team confidence that our product won't break with new deploys - it became clear the most pragmatic solution was to develop an End To End test suite.&lt;/p&gt;

&lt;h2&gt;
  
  
  Laying out our needs
&lt;/h2&gt;

&lt;p&gt;These were our initial needs exactly as voiced by our team:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cross-browser&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The suite needs to cover all major browsers with as little external service interaction as possible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Happy to code in&lt;/strong&gt; - &lt;em&gt;Meaning TypeScript&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Most probably Frontend Engineers should be able to write and maintain the tests for the suite (&lt;em&gt;with as much joy as possible&lt;/em&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Support containerized deployment&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The suite needs to be portable enough to run on a GitHub Action workflow.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Choosing a platform
&lt;/h2&gt;

&lt;p&gt;After investigating Selenium, Puppeteer, WebDriverIO, Cypress, and Playwright and weighing each platform against our needs, we decided to go with Playwright.&lt;/p&gt;

&lt;p&gt;Although it felt less hyped, as a team we felt really confident in the architecture behind Playwright, its stellar documentation and tooling, and the excellent community backing the effort.&lt;/p&gt;

&lt;p&gt;We will describe our exact selection process in a later post, but most critically, we appreciate the ability to execute our workflows across Chromium, WebKit and Firefox with so much ease and fine grained control.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1623935459404%2FP7S_f_8Cu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1623935459404%2FP7S_f_8Cu.png" alt="image.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How the suite is orchestrated
&lt;/h2&gt;

&lt;p&gt;Our End to End test suite is a separate system from our main codebase as we have seen this pattern working really well for most applications.&lt;/p&gt;

&lt;p&gt;Its main components as a Node.js application written in TypeScript are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Playwright&lt;/strong&gt; as the browser automation framework.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jest&lt;/strong&gt; as the test suite runner.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/playwright-community/jest-playwright" rel="noopener noreferrer"&gt;jest-playwright&lt;/a&gt; to connect Jest and Playwright as it makes our lives so much easier.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/marak/Faker.js/" rel="noopener noreferrer"&gt;Faker.js&lt;/a&gt; to create API fixtures that fit our needs for the sign-up and sign-in processes fixtures.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://playwright.dev/docs/pom/" rel="noopener noreferrer"&gt;Page Objects&lt;/a&gt; as the main pattern representing the interaction facade with our application views in code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These components have proved to work together seamlessly while staying welcoming to our frontend engineering team. One of our main goals was to ensure that new teammates could understand the system quickly and create new tests, and so far this structure has exceeded our expectations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Delivery of the suite on our day to day efforts
&lt;/h2&gt;

&lt;p&gt;To keep us safe from accidental regressions, the test suite must run (and pass!) before any merge to production. To automate this process, integration with our Continuous Integration (CI) tooling was essential.&lt;/p&gt;

&lt;p&gt;We run our CI through Github Actions, and fortunately, the Playwright team has created GitHub Action tools to simplify triggering the test suite. Paired with Vercel preview deployments, which is where most of our CI tasks take place, both Actions fit the spot quite nicely for End to End suite scenarios. The Playwright team has also created a GitHub action to quickly bootstrap Playwright tests.&lt;/p&gt;

&lt;p&gt;The final action file that triggers our End to End suite on every pull request looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;jobs&lt;/span&gt;:
  e2e:
    &lt;span class="k"&gt;if&lt;/span&gt;: github.event.deployment_status.state &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;'success'&lt;/span&gt;
    name: End to End
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: &lt;span class="o"&gt;[&lt;/span&gt;14.x]
    steps:
      - uses: actions/checkout@v2
      - uses: microsoft/playwright-github-action@74fbf9d1a7c5d8735dab59804da3fdd367a98020
      - uses: actions/setup-node@v1
        with:
          node-version: &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="p"&gt;{ matrix.node-version &lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
      - name: Run Playwright tests
        run: &lt;span class="nb"&gt;cd &lt;/span&gt;e2e &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm run &lt;span class="nb"&gt;test&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the action succeeds, we are good to go!&lt;/p&gt;

&lt;h2&gt;
  
  
  Parting words
&lt;/h2&gt;

&lt;p&gt;This was a really brief overview of how we went about designing our End to End test suite at &lt;a href="https://www.clerk.dev/?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=e2e" rel="noopener noreferrer"&gt;Clerk&lt;/a&gt; . As Clerk and our customers' needs continue to evolve, we will continue to share our experiences with Playwright and any new tools we adopt.&lt;/p&gt;

&lt;p&gt;_P. S. We have open sourced a template for starting up your own End To End suite using Playwright, so feel free to try it out! &lt;a href="https://github.com/clerkinc/playwright-e2e-template" rel="noopener noreferrer"&gt;https://github.com/clerkinc/playwright-e2e-template&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was originally published at &lt;a href="https://www.clerk.dev/blog/how-we-use-end-to-end-tests-to-bulletproof-our-authentication-flows-across-browsers?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=e2e" rel="noopener noreferrer"&gt;Clerk.dev&lt;/a&gt;, by one of our engineers, Peter Perlepes.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>testing</category>
      <category>typescript</category>
      <category>e2e</category>
    </item>
  </channel>
</rss>
