<?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>DEV Community: PassageNick</title>
    <description>The latest articles on DEV Community by PassageNick (@passagenick).</description>
    <link>https://dev.to/passagenick</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%2F902273%2F70f10cf7-62b3-47ce-b764-3292c6383b31.png</url>
      <title>DEV Community: PassageNick</title>
      <link>https://dev.to/passagenick</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/passagenick"/>
    <language>en</language>
    <item>
      <title>ELI5: How does a TPM work?</title>
      <dc:creator>PassageNick</dc:creator>
      <pubDate>Mon, 12 Dec 2022 18:25:40 +0000</pubDate>
      <link>https://dev.to/passagenick/eli5-how-does-a-tpm-work-3f78</link>
      <guid>https://dev.to/passagenick/eli5-how-does-a-tpm-work-3f78</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5z30p9ia88dtnikndqtg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5z30p9ia88dtnikndqtg.png" alt="Image description" width="800" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We all know that&lt;a href="https://passage.id/post/beyond-passwords" rel="noopener noreferrer"&gt; passwords leave a lot to be desired&lt;/a&gt;. They are a hassle for everyone. Fortunately, passwordless authentication is coming. Removing passwords from the authentication equation will be a welcome sight for users and software developers.&lt;/p&gt;

&lt;p&gt;You may have heard about&lt;a href="https://passage.id/post/a-look-at-passkeys" rel="noopener noreferrer"&gt; passkeys&lt;/a&gt;, a&lt;a href="https://fidoalliance.org/" rel="noopener noreferrer"&gt; standards-based solution&lt;/a&gt; that leverages biometrics and other technologies to make passwords obsolete. Most of the time, passkeys will leverage some type of biometrics to authenticate you to a given website or mobile application.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;_ You can read all about the&lt;a href="https://passage.id/post/what-is-webauth" rel="noopener noreferrer"&gt; standards used for passwordless authentication&lt;/a&gt;,&lt;a href="https://passage.id/post/a-look-at-passkeys" rel="noopener noreferrer"&gt; how it works&lt;/a&gt;, and why it is&lt;a href="https://passage.id/post/why-passkeys-are-better" rel="noopener noreferrer"&gt; a superior solution to passwords&lt;/a&gt; in other posts here on our blog._&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The great part of the whole solution is that secret information never leaves your device. Your biometrics information and passkeys are stored safely and securely on your phone or computer, unable to be accidentally shared or otherwise revealed to bad actors. Even if you lose your phone and a sophisticated hacker or other hostile entity gets a hold of it, they will not be able to pry that information from the bowels of your phone.&lt;/p&gt;

&lt;p&gt;How is that possible? Because that secret information is stored in a chip called a&lt;a href="https://trustedcomputinggroup.org/resource/trusted-platform-module-tpm-summary/" rel="noopener noreferrer"&gt; Trusted Platform Module&lt;/a&gt; (TPM).&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is a TPM?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A TPM is a very special chip, currently included in almost all new computers and phones, that is specifically designed to store your secrets, most notably passkeys and other private encryption artifacts. It is specifically designed to make it impossible to give up those secrets to anyone other than you.&lt;/p&gt;

&lt;p&gt;TPMs use encryption, hashing, and other security measures to store and protect your secrets. The TPM chip itself is also specific to your computer or phone and is protected by an additional layer of hardware security. This layer of protection prevents attackers from accessing the sensitive information that is stored inside the TPM.&lt;/p&gt;

&lt;p&gt;The TPM works in concert with the device’s operating system (Windows, iOS, OS X, Android, etc.) to do all kinds of cryptography-related things. However, what we are concerned with here is its ability to manage and protect private encryption keys—otherwise known as passkeys. When you ask for a passkey to be created, the TPM generates it, stores the secret, private key safely away without ever exposing it to anyone, and hands out the public key to the website or mobile application to use.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I have had a Dell laptop for several years running Windows 10, but when it came time to upgrade to Windows 11, it wouldn’t install. Why? Because Windows 11 requires the presence of a TPM, and my older laptop didn’t have it. Windows 11 needs the TPM to support Windows Hello and provide a much higher level of security for access to your computer.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How Does a TPM Keep Secrets?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The primary way TPMs work their magic is by isolating secrets away from everything and everyone, even the operating system. No entity ever sees the secrets stored by the TPM. This means that when a TPM is used to validate a signed data chunk, it can do so without revealing any secrets. The TPM will perform the necessary calculations to verify the signature, and then the results are sent back to the requesting application. Again, no secrets are ever revealed in any way, shape, or form.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;I keep using qualifiers like “basically” and “considered” in front of “impossible” because no one can predict the future, and no specification should ever be considered perfect. While many smart people have worked for many years to make sure TPMs are impregnable, one can never be 100% sure that there isn’t a bug, nor can one be sure that some computing breakthrough makes all that hard work moot.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Second, TPMs are literally soldered directly to a specific motherboard and given a unique, unalterable identifier, thus ensuring that each one — along with the chip’s given configuration — is uniquely identifiable and every action produced by a specific TPM is traceable to that TPM. Thus, you can know what specific device has provided credentials, and you can be sure that said device hasn’t been compromised. This ensures the integrity of the entire process.&lt;/p&gt;

&lt;p&gt;Third, the TPM is designed to defend against brute-force attacks. A brute force attack is a process of simply trying, over and over, every possible key in the hopes that one of them will succeed. A TPM will shut itself down and accept no more queries if too many requests are submitted in a given period. But don’t worry; there is an option for recovery after a specific time has passed.&lt;/p&gt;

&lt;p&gt;On top of all that is the fact that the TPM standards and specifications have been around — and thus battle-tested — for over twenty years. Everything about a TPM, including the source code, is publicly available. As noted above, that doesn’t promise impregnability, but twenty years is a long time in the technology world.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Bottom Line&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The bottom line is that a TPM is well-designed, well-tested, and well-proven. For all intents and purposes, it is impregnable, doing the job of protecting the secrets entrusted to it. Given the inevitability of a passwordless future, TPMs will certainly be an integral part of all devices requiring authentication services for years to come. As a result, users can rest assured that the passwordless authentication process is safe, secure, and hassle-free.&lt;/p&gt;

</description>
      <category>learning</category>
    </item>
    <item>
      <title>Seven Misunderstandings About Passkeys</title>
      <dc:creator>PassageNick</dc:creator>
      <pubDate>Wed, 16 Nov 2022 20:33:56 +0000</pubDate>
      <link>https://dev.to/passage/seven-misunderstandings-about-passkeys-3b2h</link>
      <guid>https://dev.to/passage/seven-misunderstandings-about-passkeys-3b2h</guid>
      <description>&lt;h2&gt;
  
  
  Rightfully Resistant to Change
&lt;/h2&gt;

&lt;p&gt;Password management is a thing that many people feel very strongly about. Many folks don’t like passwords and hope for a better way. But other folks have a solid system built around their password security and are rightfully very skeptical of systems that claim to improve on what they have. They have good reasons for liking their current setup and are hesitant to change what works for them. That’s wise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passkeys Enter the Picture
&lt;/h2&gt;

&lt;p&gt;Thus many people are skeptical of passkeys, the new protocol from the FIDO Alliance that purports to drastically improve the safety, security, and user experience of logging in to websites and mobile applications.&lt;/p&gt;

&lt;p&gt;Passkeys have been officially announced by Apple and put into developer builds for Chrome and Android by Google. Microsoft is preparing its version as well. The reason that these three companies are critical to adoption is that they represent the vast majority of devices, computers, browsers, and operating systems. If these three all agree on something, then there is probably something to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  I Read the Comments
&lt;/h2&gt;

&lt;p&gt;Since both Apple and Google have announced support for passkeys, there have been many articles describing passkeys, how they work, and how the tech giants will support them. Many have been informative, but a few have been, well, confusing.&lt;/p&gt;

&lt;p&gt;It is said that you should never read the comments, but I have been. And to say there is some confusion, trepidation, and misconceptions about passkeys is a bit of an understatement.&lt;/p&gt;

&lt;p&gt;I’ve written about&lt;a href="https://passage.id/post/beyond-passwords"&gt; why we need passkeys&lt;/a&gt;,&lt;a href="https://passage.id/post/what-is-webauth"&gt; how they work&lt;/a&gt;, and&lt;a href="https://passage.id/post/why-passkeys-are-better"&gt; why they are a better solution than passwords&lt;/a&gt;. To continue that theme, I’m going to write about a few of the misconceptions I see out there about passkeys.&lt;/p&gt;

&lt;h2&gt;
  
  
  “Will there still be a password somewhere?”
&lt;/h2&gt;

&lt;p&gt;People seem to think that there will still be a password backing things up somewhere in the system. Some say this because they hope it is true as a recovery method, but others are concerned that it is true, recognizing that it wouldn’t really improve the situation.&lt;/p&gt;

&lt;p&gt;The&lt;a href="https://webauthn.guide/"&gt; WebAuthn&lt;/a&gt; protocol does not — and should not — require the use of passwords anywhere in the system. It should not because requiring a password would defeat the purpose and cause the system to continue to be “phishable” and thus no more secure than what we have today. There is no password backup because it isn’t necessary.&lt;/p&gt;

&lt;p&gt;Now it may be that as websites and applications migrate to passwordless and passkey-based solutions, they may maintain password authentication. Still, it isn’t required, and it is expected that passwords will eventually go away completely.&lt;/p&gt;

&lt;h2&gt;
  
  
  “Is Bluetooth required to log in?”
&lt;/h2&gt;

&lt;p&gt;Some articles mistakenly implied that a Bluetooth connection was required to complete a passkey login.&lt;/p&gt;

&lt;p&gt;This is not true. While Bluetooth plays a role in securing the transfer of passkey-based authentication between the major tech company’s eco-systems, it is not required for the simple process of logging in. Your phone doesn’t have to be in Bluetooth range to log in on your computer. Your phone does have to be in range if you want to transfer passkeys to or from another device — and this is a security feature.&lt;/p&gt;

&lt;h2&gt;
  
  
  “I can register my device once, and it will log me in everywhere.”
&lt;/h2&gt;

&lt;p&gt;Some folks have concluded that you can register your phone or computer with Apple, Microsoft, or Google, and it will work everywhere. This led to questions like “What happens when I go to a website that asks me for my password?” It would be nice if that would work that way. However, each website has to implement passwordless technology on its own, and you, as a user, will have to register an account with each site or mobile application just as you do today.&lt;/p&gt;

&lt;h2&gt;
  
  
  “If a bad guy gets my phone, will they have access to all of my accounts?”
&lt;/h2&gt;

&lt;p&gt;Actually, if a bad actor gets your phone, it is pretty much impossible for them to get much of anything. First, they won’t have your biometric information and thus won’t even be able to unlock your phone. Second, all the secret passkey information is stored in a&lt;a href="https://trustedcomputinggroup.org/resource/trusted-platform-module-tpm-summary/"&gt; Trusted Platform Module&lt;/a&gt;, specifically designed to hold your passkey secrets in such a way that it is virtually impenetrable. (Okay, maybe the NSA or similar organizations might be able to get into it, but I can’t say for sure…)&lt;/p&gt;

&lt;p&gt;So you can rest assured that your phone will not cough up your login information to even the most sophisticated hacker.&lt;/p&gt;

&lt;h2&gt;
  
  
  *“If I don’t have my phone, am I out of luck?”
&lt;/h2&gt;

&lt;p&gt;People are concerned that if they don’t have their phone while at a friend’s house or a library computer, they won’t be able to log in.&lt;/p&gt;

&lt;p&gt;The passkey protocol doesn’t address this situation, but most vendors will — and should — provide a second secure option for logging in. Usually, this is a “magic link” — a one-use, expiring link that logs you in — sent to your email address. Only you have access to your email, so the link will securely log you into any computer worldwide.&lt;/p&gt;

&lt;h2&gt;
  
  
  “If I lose my phone, am I out of luck?”
&lt;/h2&gt;

&lt;p&gt;This is partially true. Sort of.&lt;/p&gt;

&lt;p&gt;One of the benefits of passkeys is that they are promised to be shared across devices within the given ecosystem of each of the big tech companies. This means that if you lose your phone, your passkeys are securely stored (via end-to-end encryption) in the cloud. They can be restored when you get a new phone.&lt;/p&gt;

&lt;p&gt;However, you can choose not to share your passkeys into the cloud, and if you do that and you only have one device, then yes, the passkeys will be lost, and you’ll have to re-register with every site you visit.&lt;/p&gt;

&lt;p&gt;The normal use case here is that users decide to share their passkeys across their devices via the cloud (in a securely encrypted manner), and thus replacing a phone is not an issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  “What if my biometrics are compromised?”
&lt;/h2&gt;

&lt;p&gt;Some folks seem concerned that they can’t change their biometrics if they were to be compromised. (You can change your password, but you can’t change your fingerprint…)&lt;/p&gt;

&lt;p&gt;These folks are right — you can’t change your biometrics. However, it is not clear what it means exactly for them to be compromised. Your biometrics data never leaves your phone. It is converted to a mathematical hash value and encrypted with a key stored in the TPM. Only your phone with your fingerprint can get the key and verify your fingerprint. Your biometric data can’t be stored and decrypted anywhere except on your phone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Almost Too Good to be True?
&lt;/h2&gt;

&lt;p&gt;I’m not going to say that passkeys are too good to be true, but I will say that they are a huge step forward in authentication security. If the threat surface of passwords is a vast lake, then the threat surface of passkeys is a small puddle after a short downpour. While no system should be considered impregnable, no one seems to be able to conceive of a way passkeys can be compromised short of quantum computing breaking current encryption schemes.&lt;/p&gt;

&lt;p&gt;There are a few corner cases where they might not be acceptable to some people. For instance, biometrics are not protected by America’s Fourth Amendment, but a password is. Another thing to consider is that while Google/Apple/Microsoft won’t ever be able to read your credentials, there is concern that these companies will be able to track the places you register an account. This is why third-party companies like&lt;a href="https://www.1password.com"&gt; 1Password&lt;/a&gt; are looking at ways to provide the passkey storage and transfer service.&lt;/p&gt;

&lt;p&gt;Bottom Line: For the overwhelming majority, passkeys are safe, convenient, and work great. While I understand the hesitancy to change things up, this is an instance when change is a win for everyone.&lt;/p&gt;

</description>
      <category>authentication</category>
      <category>passwordless</category>
      <category>passkeys</category>
      <category>security</category>
    </item>
    <item>
      <title>Why Passkeys are Better than Passwords</title>
      <dc:creator>PassageNick</dc:creator>
      <pubDate>Mon, 17 Oct 2022 20:03:58 +0000</pubDate>
      <link>https://dev.to/passage/why-passkeys-are-better-than-passwords-3p4g</link>
      <guid>https://dev.to/passage/why-passkeys-are-better-than-passwords-3p4g</guid>
      <description>&lt;p&gt;Maybe you’ve had the feeling — or maybe you’ve imagined it. The feeling of your stomach sinking to the bottom of your belly. That panic you feel the very second you realize that you just entered your login credentials into a fake website. Maybe you realized it right away. Or maybe you realized because you went back the next day and couldn’t log in. Maybe you realized it because your bank account has been cleaned out. However you realized — or imagined — it, it’s not a feeling you ever want to have.&lt;/p&gt;

&lt;p&gt;But imagine not having to worry about that ever again.&lt;/p&gt;

&lt;p&gt;That’s what passkeys and passwordless authentication can bring you.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why Passkeys are Better&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Every day we grow closer to a passwordless world. We here at &lt;a href="https://passage.id"&gt;Passage&lt;/a&gt; are doing what we can to make that happen for everyone. We all carry devices with us that can be used to easily declare who we are, normally via a fingerprint or face scan. All new laptops have fingerprint readers. &lt;a href="https://passage.id/post/a-look-at-passkeys"&gt;Passkeys&lt;/a&gt; leverage these new technologies to drastically increase the security of your accounts. Apple has introduced passkeys into their eco-system, with Microsoft and &lt;a href="https://android-developers.googleblog.com/2022/10/bringing-passkeys-to-android-and-chrome.html"&gt;Google&lt;/a&gt; releasing their versions very soon.&lt;/p&gt;

&lt;p&gt;I’ve written about &lt;a href="https://passage.id/post/beyond-passwords"&gt;why we must move beyond passwords&lt;/a&gt; and how the &lt;a href="https://passage.id/post/what-is-webauth"&gt;whole passkey system works&lt;/a&gt;. In this post, I will discuss why passkeys are a vastly better solution than passwords. There are many reasons why passkeys are a superior solution, but it all boils down to two things.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Passkeys Share no Secret Information&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is the biggest reason passkeys are much more secure than passwords. With Passkeys, passwords are simply no longer a threat vector.&lt;/p&gt;

&lt;p&gt;Passwords account for &lt;a href="https://passage.id/post/beyond-passwords"&gt;north of 80% of all security breaches.&lt;/a&gt; Passkeys mitigate this threat down to almost nothing. You can’t reuse your passkeys. You don’t have to remember them. They are generated and stored for you, so you don’t have to worry about creating and storing them yourself. You can’t be lured into giving them up because they are unique to a specific website and thus can’t be shared with a phishing website.&lt;/p&gt;

&lt;p&gt;Sensitive data associated with each passkey never leaves your device. The information is stored on your phone on a special chip (a &lt;a href="https://trustedcomputinggroup.org/resource/trusted-platform-module-tpm-summary/"&gt;Trusted Platform Module&lt;/a&gt;) that even the NSA might not be able to crack. If you register with a website using a passwordless solution like Passage, that site gets nothing but a public key, which is useless for cracking open your account. While Apple lets you share your account with others via AirDrop, you couldn’t even share the actual private key with a phishing site if you wanted to.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Passkeys are a Much Better User Experience&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Registering for an account on a website can be a hassle. Often you have to think up a password meeting various criteria designed to make it hard to guess. Frequently, users have to context switch away from your site to get a six-digit number from their phone or an email. Over 30% of all online shopping carts are abandoned because of the bother of registering for an account or because users don’t remember their passwords. Password Managers can help the situation, but they can be complicated to use for many. The whole experience needs improving.&lt;/p&gt;

&lt;p&gt;Multi-factor authentication (MFA) can improve the security of a password-based system but does so at the cost of decreased user experience. MFA requires the user to switch contexts, usually by going to another application to grab a six-digit number. I know I’ve often fumbled to find my phone to get that one-time password.&lt;/p&gt;

&lt;p&gt;Instead, passkey registration requires a biometric system validation — as simple as a fingerprint touch or a glance at a camera — and one-time device approval. After that, logging in is as simple as that biometric validation. Instead of typing complicated passwords and grabbing one-time password codes or checking emails, your users can log in in seconds or less.&lt;/p&gt;

&lt;p&gt;Passkeys actually use MFA, requiring you to supply something you have (your device) and something you are (for example, your face or your fingerprint).&lt;/p&gt;

&lt;p&gt;Passkeys are only getting better. Ultimately, you will be able to log in without even entering your password or phone number. Instead, the login input box will just know that your device has a Passkey for the given domain and will auto-prompt you.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Let’s Do This&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;I remember that great feeling when my bank’s mobile application allowed me to log in with my fingerprint instead of typing my complicated (and ultimately not secure, no matter how complex it was) password. It was a freeing moment for sure. You want that for your users when they come to your website or log in to your mobile application, don’t you? Heck, you want that for yourself every time.&lt;/p&gt;

&lt;p&gt;In the end, passkeys appear virtually unexploitable and vastly more convenient. &lt;a href="https://passage.id/demo"&gt;Why not give it a try right now&lt;/a&gt;?&lt;/p&gt;

</description>
      <category>passwordless</category>
      <category>authentication</category>
      <category>security</category>
      <category>passkeys</category>
    </item>
    <item>
      <title>Building an Angular App with Passwordless Authentication</title>
      <dc:creator>PassageNick</dc:creator>
      <pubDate>Fri, 07 Oct 2022 20:02:49 +0000</pubDate>
      <link>https://dev.to/passage/building-an-angular-app-with-passwordless-authentication-2gme</link>
      <guid>https://dev.to/passage/building-an-angular-app-with-passwordless-authentication-2gme</guid>
      <description>&lt;p&gt;We here at &lt;a href="https://passage.id"&gt;Passage&lt;/a&gt; are all about creating a passwordless world that makes our online lives a whole lot more secure.  &lt;a href="https://angular.io"&gt;Angular&lt;/a&gt; developers can join that world and quickly integrate Passage’s solution into their applications.  I’ll show you how.&lt;/p&gt;

&lt;p&gt;Our solution uses &lt;a href="https://passage.id/post/what-is-webauth"&gt;the WebAuthn protocol&lt;/a&gt; to leverage the biometrics solutions built into their devices (e.g., FaceID, TouchID, Windows Hello, or Android’s fingerprint technology).  We’ll create a simple Angular application that only allows authenticated viewers to see a dashboard.  Unauthorized viewers will be out of luck.&lt;/p&gt;

&lt;p&gt;If you are highly motivated, you can go through the whole demo with me, or if you want to cut to the quick, you can clone our example app from GitHub and jump to the header entitled “Add Passwordless Authentication with Passage.” Either way, you’ll soon see how easy this is for everyone, both for you developer types and your users.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: I’ll be assuming that you are pretty familiar with Angular, the Angular CLI, and how things generally work in Angular.  If not, Angular.io is a great place to start.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;To create an Angular application, you can run the following at the command line at a command prompt in the directory where you want your application to go:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng new passage-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note:  Create the app with the angular router and with regular &lt;br&gt;
CSS Styling&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That will create a nice, basic application for you in a subdirectory called passage-app.&lt;/p&gt;

&lt;p&gt;So, to include Passage in your application, you are going to want to install it into your application workspace via &lt;code&gt;npm&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i @passageidentity/passage-node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That will install our Passage web components, which will enable us to include them later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Main App Setup
&lt;/h2&gt;

&lt;p&gt;Before we get really rolling, let’s do a little styling.  Open up the project’s main CSS file, &lt;code&gt;styles.css&lt;/code&gt;, and add the following code to it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#E5E5E5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&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;Next, open up the CSS file for the main component — &lt;code&gt;app.component.css&lt;/code&gt; — and add this CSS code to it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.mainContainer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;600px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;310px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.footer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18px&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;That will get us started with the styling. We’ll be doing more of that here in a few steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Main Component
&lt;/h2&gt;

&lt;p&gt;Next, we’ll get the main component for our application set up.  We’ll insert some HTML, set up the routes, and add some more CSS.&lt;/p&gt;

&lt;p&gt;For the &lt;code&gt;app-routing.module.ts&lt;/code&gt; file, make it look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NgModule&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;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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;RouterModule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Routes&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;@angular/router&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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;HomeComponent&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;src/app/home/home.component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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;DashboardComponent&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;src/app/dashboard/dashboard.component&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Routes&lt;/span&gt; &lt;span class="o"&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;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;HomeComponent&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dashboard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;DashboardComponent&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="nd"&gt;NgModule&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;RouterModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;forRoot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;)],&lt;/span&gt;
    &lt;span class="na"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;RouterModule&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="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;AppRoutingModule&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;This code will set two routes, one for the Home component and one for the Dashboard component.&lt;/p&gt;

&lt;p&gt;Add the following to the &lt;code&gt;app.component.css&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.mainContainer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;310px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;310px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.footer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;text-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18px&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;and for the &lt;code&gt;app.component.html&lt;/code&gt; file, replace the default HTML (there’s a bunch of it) with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;banner&amp;gt;&amp;lt;/banner&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mainContainer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;router-outlet&amp;gt;&amp;lt;/router-outlet&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"footer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    Learn more with our &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://docs.passage.id"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Documentation&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt; and &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://github.com/passageidentity"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Github&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;.      
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That code will display the banner on top, a footer at the bottom, and will place the content chosen by the router in the middle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some Components
&lt;/h2&gt;

&lt;p&gt;Next up, we’ll create three components.  Run these three calls to the Angular CLI at the command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng generate component home
ng generate component dashboard
ng generate component banner
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s set all this up now.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Home Component
&lt;/h2&gt;

&lt;p&gt;In the &lt;code&gt;home.component.html&lt;/code&gt; file, add this HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;passage-auth&lt;/span&gt; &lt;span class="na"&gt;[appId]=&lt;/span&gt;&lt;span class="s"&gt;"appId"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/passage-auth&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;passage-auth&lt;/span&gt; &lt;span class="na"&gt;[appId]=&lt;/span&gt;&lt;span class="s"&gt;"appId"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/passage-auth&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;code&gt;home.component.ts&lt;/code&gt; file, add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;OnInit&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;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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;environment&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;src/environments/environment&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;app-home&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./home.component.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;styleUrls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./home.component.css&lt;/span&gt;&lt;span class="dl"&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="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;HomeComponent&lt;/span&gt; &lt;span class="k"&gt;implements&lt;/span&gt; &lt;span class="nx"&gt;OnInit&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;appId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;passageAppId&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;constructor&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="nx"&gt;ngOnInit&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="k"&gt;void&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;And in the &lt;code&gt;home.component.css&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.mainContainer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.spacer&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;flex-grow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.earlyAccessContainer&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;325px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;35%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#27417E&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-top-left-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-bottom-left-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;700&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;48px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;65px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;45px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding-right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;65px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.bodyText&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;45px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding-right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;45px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;35px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.authContainer&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;65%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;justify-content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding-right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c"&gt;/* for shorter 13" dekstop screens */&lt;/span&gt;
  &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;845px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;40px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nc"&gt;.bodyText&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&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="c"&gt;/* steps to mobile rules begin here */&lt;/span&gt;
  &lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;870px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="nc"&gt;.mainContainer&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;flex-direction&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nc"&gt;.earlyAccessContainer&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;unset&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;border-top-left-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;border-top-right-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;border-bottom-left-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;border-bottom-right-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;32px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;padding-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;padding-right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nc"&gt;.bodyText&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;padding-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;padding-right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;padding-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;15px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nc"&gt;.authContainer&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;flex-grow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;padding-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;padding-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;padding-right&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0px&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="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;670px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nc"&gt;.bodyText&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16px&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="k"&gt;@media&lt;/span&gt; &lt;span class="n"&gt;screen&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;460px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;.earlyAccessContainer&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;unset&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;The Home component doesn’t do anything special — it just holds a single component.  That component is a Passage-specific tag, namely &lt;code&gt;&amp;lt;passage-auth&amp;gt;&lt;/code&gt;, which will display the Passage web component and do most of the work of registering and authenticating your users.&lt;/p&gt;

&lt;p&gt;That tag also includes a reference to an &lt;code&gt;appId&lt;/code&gt; which will uniquely identify your application to our servers and which we will create here in a bit. The &lt;code&gt;home.component.ts&lt;/code&gt; file pulls the &lt;code&gt;appID&lt;/code&gt; value out of the &lt;code&gt;environment.ts&lt;/code&gt; file.  We’ll set that part up later as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Banner Component
&lt;/h2&gt;

&lt;p&gt;The Banner component displays a nice header on the top of the page.  There’s no functionality in the component, so it’s a bit easier to set up.&lt;/p&gt;

&lt;p&gt;Set the &lt;code&gt;banner.component.html&lt;/code&gt; file to look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"mainHeader"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://passage.id/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"passageLogo"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"headerText"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Passage + Angular Example App&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"spacer"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://passage.id/"&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"link"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Go to Passage&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the &lt;code&gt;banner.component.css&lt;/code&gt; as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.mainHeader&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#282727&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.headerText&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.passageLogo&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url('https://storage.googleapis.com/passage-docs/passage-logo-dark.svg')&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background-repeat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;no-repeat&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;60px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.spacer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;flex-grow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.link&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin-left&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-decoration-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;white&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;You can leave the &lt;code&gt;banner.component.ts&lt;/code&gt; file alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Dashboard Component
&lt;/h2&gt;

&lt;p&gt;The Dashboard component is where all the “real” work will get done.  It will display differently based on whether or not the user is authenticated.  I’ll show you the code, and then I’ll discuss more about what it does after we get everything all set up.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;dashboard.component.ts&lt;/code&gt; file should include this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;OnInit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Input&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;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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;AuthService&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;src/app/auth.service&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Component&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dashboard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;templateUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./dashboard.component.html&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;styleUrls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./dashboard.component.css&lt;/span&gt;&lt;span class="dl"&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="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;DashboardComponent&lt;/span&gt; &lt;span class="k"&gt;implements&lt;/span&gt; &lt;span class="nx"&gt;OnInit&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;dashboard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Boolean&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;isAuthenticated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Boolean&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="nx"&gt;authService&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;AuthService&lt;/span&gt;&lt;span class="p"&gt;){}&lt;/span&gt;

  &lt;span class="nx"&gt;ngOnInit&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;authService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;authService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isAuthenticated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;authService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isAuthenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;authService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isAuthenticated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&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;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add this HTML to &lt;code&gt;dashboard.component.html&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"dashboard"&lt;/span&gt; &lt;span class="na"&gt;*ngIf=&lt;/span&gt;&lt;span class="s"&gt;"!isLoading &amp;amp;&amp;amp; isAuthenticated"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        Welcome!
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        You successfully signed in with Passage.
        &lt;span class="nt"&gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/span&gt;
        Your username is: &lt;span class="nt"&gt;&amp;lt;b&amp;gt;&lt;/span&gt;\{\{ username \}\}
        &lt;span class="nt"&gt;&amp;lt;/b&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"dashboard"&lt;/span&gt; &lt;span class="na"&gt;*ngIf=&lt;/span&gt;&lt;span class="s"&gt;"!isLoading &amp;amp;&amp;amp; !isAuthenticated"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
       Unauthorized 
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        You have not logged in and cannot view the dashboard.
        &lt;span class="nt"&gt;&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt; &lt;span class="na"&gt;className=&lt;/span&gt;&lt;span class="s"&gt;{styles.link}&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Login to continue.&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt; 
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and finally, in &lt;code&gt;dashboard.component.css&lt;/code&gt; add this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.dashboard&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.title&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;700&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;margin-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;30px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.message&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;overflow-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;anywhere&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.link&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-decoration-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;black&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;h2&gt;
  
  
  An Authorization Service
&lt;/h2&gt;

&lt;p&gt;At the heart of the application is an Authorization service.  It is where your application checks the credentials presented.&lt;/p&gt;

&lt;p&gt;Create the Authentication service at the command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng generate service Auth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That creates a file called &lt;code&gt;auth.service.ts&lt;/code&gt;.  Change the code in that file to the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Injectable&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;@angular/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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;PassageUser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;PassageUserInfo&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;@passageidentity/passage-elements/passage-user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Injectable&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;providedIn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;root&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;AuthService&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
  &lt;span class="nl"&gt;isAuthenticated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;isLoading&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;boolean&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;constructor&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="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;boolean&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;PassageUser&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;userInfo&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userInfo&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
       &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;userInfo&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isAuthenticated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;userInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;userInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;userInfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;phone&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
       &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoading&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isAuthenticated&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&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;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isAuthenticated&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;There.  That ought to do it.  That’s a lot of code, but building it yourself is more fun, right?&lt;/p&gt;

&lt;h2&gt;
  
  
  Add Passwordless Authentication with Passage
&lt;/h2&gt;

&lt;p&gt;Okay, that part is finished. Now, we need to tell Passage what you are up to and connect Passage to our application.&lt;/p&gt;

&lt;p&gt;The first step is to &lt;strong&gt;register with Passage&lt;/strong&gt;.  &lt;a href="https://console.passage.id/register"&gt;You can do that on this page&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note that you’ll use our passwordless solution to register and log in!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once you are in, click the big plus sign to create a new application. From there,&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Name&lt;/strong&gt; your application whatever you like.&lt;/p&gt;

&lt;p&gt;Set the &lt;strong&gt;Domain&lt;/strong&gt; to &lt;code&gt;http://localhost:4200&lt;/code&gt; (this is the default for your Angular application)&lt;/p&gt;

&lt;p&gt;Set the &lt;strong&gt;Redirect URL&lt;/strong&gt; to:  &lt;code&gt;/dashboard&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and then select the “Angular” icon and press the “Create New Application” button.&lt;/p&gt;

&lt;p&gt;This should set up your application, and you should see the Passage Console displaying something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yFt9dTrh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ijl2edxbbwx5fhqjv0v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yFt9dTrh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ijl2edxbbwx5fhqjv0v.png" alt="The Passage Console for a new application" width="880" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Passage Dashboard for your Angular Application
&lt;/h2&gt;

&lt;p&gt;In the “App Info” section on the left, you should have an Application ID (I’ve obfuscated mine in the graphic above).  Copy that value, and then open up the &lt;code&gt;environment.ts&lt;/code&gt; file in your application and add the following entry to the default values found there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;environment&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;production&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;passageAppId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;Put your AppID here&amp;gt;&lt;/span&gt;&lt;span class="dl"&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;What this does is uniquely identify your application to Passage and allow us to work our authentication magic as well as keep stats for you about your application and your users.&lt;/p&gt;

&lt;p&gt;Okay, if all is put together correctly, you should be able to go to the command line for your application and enter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ng serve --open
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you should see something that looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gn8krAbM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7a8cnxv9pwuvz9vio8iv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gn8krAbM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7a8cnxv9pwuvz9vio8iv.png" alt="Your Angular app running and asking you to log in" width="880" height="625"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If everything is working, you should now be able to enter an email address into the login screen, register your device via biometrics, and log in to see the &lt;code&gt;/dashboard&lt;/code&gt; page.  If you don’t log in and try to navigate to the &lt;code&gt;/dashboard&lt;/code&gt; page, you won’t be able to see anything except a message telling you that you aren’t logged in.&lt;/p&gt;

&lt;h2&gt;
  
  
  So What is Going on Here?
&lt;/h2&gt;

&lt;p&gt;Well, a lot is going on here, but most of it is built into the Passage Web Component element.&lt;/p&gt;

&lt;p&gt;The Passage element does all the work of registering and logging in users.  You don’t have to do anything past what you’ve already done.  The default component is pretty plain-looking by default, but don’t worry — &lt;a href="https://docs.passage.id/customization/ui-customization"&gt;you can customize it to your heart’s content&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Passage authenticates users using &lt;a href="https://passage.id/post/what-is-webauth"&gt;the WebAuthn protocol&lt;/a&gt; as standardized by the &lt;a href="https://fidoalliance.org/"&gt;FIDO Alliance&lt;/a&gt;.  Once it authenticates a user, Passage returns a signed &lt;a href="https://en.wikipedia.org/wiki/JSON_Web_Token"&gt;JSON Web Token&lt;/a&gt; to identify the user.  The whole process is hidden from you, the developer, and your users.  All they need to worry about is authenticating with a simple biometrics check.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does the Code Do?
&lt;/h2&gt;

&lt;p&gt;As far as what the code is up to, we’ll look at two of the files in the application — &lt;code&gt;auth.service.ts&lt;/code&gt; and &lt;code&gt;dashboard.component.ts&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;First is the Authentication service.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;AuthService&lt;/code&gt; class contains three variables — &lt;code&gt;isAuthenticated&lt;/code&gt;, &lt;code&gt;username&lt;/code&gt;, and &lt;code&gt;isLoading&lt;/code&gt;.  &lt;code&gt;isAuthenticated&lt;/code&gt; is the key variable here because it is the one that will keep track of whether or not the user is logged in.&lt;/p&gt;

&lt;p&gt;The class contains a single function called &lt;code&gt;isLoggedIn()&lt;/code&gt; .  This function uses the &lt;code&gt;PassageUser&lt;/code&gt; class, which is included with the Passage code.&lt;/p&gt;

&lt;p&gt;The class is imported via the following import statement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;PassageUser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;PassageUserInfo&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;@passageidentity/passage-elements/passage-user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the code in &lt;code&gt;isLoggedin()&lt;/code&gt; merely asks the &lt;code&gt;PassageUser()&lt;/code&gt; function for it’s userInfo().  That returns a promise, and if the &lt;code&gt;userInfo&lt;/code&gt; is defined, then we know a valid user is present.  The variables are set appropriately, and the function returns true because &lt;code&gt;isAuthenticated&lt;/code&gt; is true.  If the &lt;code&gt;userInfo&lt;/code&gt; isn’t found, then the opposite occurs.&lt;/p&gt;

&lt;p&gt;This takes us to the Dashboard component.  In the &lt;code&gt;dashboard.component.ts&lt;/code&gt; file, the &lt;code&gt;ngOnInit(&lt;/code&gt;) method is called, and the &lt;code&gt;AuthService&lt;/code&gt; class is used to set the variables for the class, tracking the status of the user.  This is again a promise, so that the information can be properly retrieved and read by the HTML file asynchronously.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;dashboard.component.html&lt;/code&gt; file is used to display one of two views, depending on whether the user is authenticated.  If the user is authenticated, the username is displayed.&lt;/p&gt;

&lt;p&gt;Pretty straightforward, I think.&lt;/p&gt;

&lt;p&gt;Just for fun, once you run through the registration and login process a few times with a few different email addresses, you can explore the Console and see the data accumulating for your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding Out More
&lt;/h2&gt;

&lt;p&gt;There is more to Passage.  I already mentioned how you can easily customize the look of the Passage element.  In addition, you can collect and store additional information about your users if you like.  You can also display a user’s profile with a single HTML element.  And of course, we will be continually adding new and useful features.&lt;/p&gt;

&lt;p&gt;You can see the &lt;code&gt;&amp;lt;passage-profile&amp;gt;&lt;/code&gt; element at work in the &lt;code&gt;02-Login-With-Profile&lt;/code&gt; application that is &lt;a href="https://github.com/passageidentity/example-angular"&gt;part of our GitHub Angular example&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More About Passage
&lt;/h2&gt;

&lt;p&gt;So there you have it. If you have any questions at all or need more assistance, or just want to find out more about what we at Passage are up to, please email us at &lt;a href="mailto:support@passage.id"&gt;support@passage.id&lt;/a&gt;, &lt;a href="https://airtable.com/shriJ6n4asgxuGAdU"&gt;fill out this form&lt;/a&gt;, or join our &lt;a href="https://discord.com/invite/445QpyEDXh"&gt;Discord&lt;/a&gt;.  We are quite pleased to hear from folks.&lt;/p&gt;

</description>
      <category>authentication</category>
      <category>passwordless</category>
      <category>angular</category>
    </item>
    <item>
      <title>How Does WebAuthn Work?</title>
      <dc:creator>PassageNick</dc:creator>
      <pubDate>Tue, 20 Sep 2022 20:26:15 +0000</pubDate>
      <link>https://dev.to/passage/how-does-webauthn-work-25p3</link>
      <guid>https://dev.to/passage/how-does-webauthn-work-25p3</guid>
      <description>&lt;p&gt;&lt;a href="https://passage.id/post/beyond-passwords" rel="noopener noreferrer"&gt;In my previous post&lt;/a&gt;, I discussed why passwords are problematic at best and a severe security threat at worst. However, you probably currently have a password-based authentication solution.  Hopefully you have implemented some type of Multi-factor Authentication. You might even have implemented Brute Force Password Protection and Breached Password Detection.  But in the end you realize that passwords are still a problem.   Of course, after reading all that you were probably thinking “But what else is there?”&lt;/p&gt;

&lt;p&gt;Well, thankfully, some very smart people have been working on this problem.  They formed an organization, worked the problem, and came up with a delightfully effective solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;The FIDO Alliance&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In July of 2012, The Fast Identity Online Alliance – FIDO – was formed by PayPal, Lenovo, and other organizations interested in getting rid of the password.  Soon enough, Google, Microsoft, and Apple got on board along with many other companies.  (Passage is a member of the FIDO Alliance).&lt;/p&gt;

&lt;p&gt;FIDO soon developed open and free specifications for doing passwordless authentication.  The key specification is the &lt;a href="https://en.wikipedia.org/wiki/WebAuthn" rel="noopener noreferrer"&gt;WebAuthn&lt;/a&gt; standard approved by the World Wide Web Consortium (W3C).  WebAuthn uses public key cryptography to allow browsers and web resources to authenticate using passwordless methods such as biometrics.&lt;/p&gt;

&lt;p&gt;This solution is formally called “Multi-device FIDO Credentials,” but informally, they are called “Passkeys”.  Passkeys are based on a FIDO-developed protocol called WebAuthn.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How WebAuthn Works&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;WebAuthn is quite clever.  It leverages the power of public key cryptography to create a way for users to login to mobile and web applications without those applications having to store any secret information at all.&lt;/p&gt;

&lt;p&gt;Normally, when one thinks of public key cryptography, one thinks of using it to send a secret message to a person who then decrypts it and reads it.  Well, this can kind of work in reverse.  If you send them a message encrypted with their public key, then they – and only they – are the only one who can decrypt because only they have the private key that corresponds to the given public key.  Once they do, you can be highly confident that they are the entity that they say they are.&lt;/p&gt;

&lt;p&gt;Currently, all the major browsers – Chrome, Firefox, Edge, and Safari – all support the WebAuthn specification.  If your phone – iPhone or Android – has a fingerprint reader or facial scanner, it supports WebAuthn. Windows provides WebAuthn support via Windows Hello.&lt;/p&gt;

&lt;p&gt;All of this translates to passwordless authentication quite nicely.  WebAuthn typically goes like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You want to log in to a website, so you go to it.&lt;/li&gt;
&lt;li&gt;The website asks for your unique identifier, usually your email address or phone number. They may also ask for a username.&lt;/li&gt;
&lt;li&gt;The website gets the information, and realizes that it has never heard of you before.&lt;/li&gt;
&lt;li&gt;The website says “Hey, send me a public key that is unique to me.”&lt;/li&gt;
&lt;li&gt;You validate yourself on your device. This can be via biometrics, a PIN, or inserting something like your Yubikey.&lt;/li&gt;
&lt;li&gt;Once validated, your device generates a unique public/private key specific associated only with that website.&lt;/li&gt;
&lt;li&gt;You send the site your public key. The site stores that for later use. You save the private key on your device. Note that no secret information at all leaves your device.&lt;/li&gt;
&lt;li&gt;At this point, the site doesn’t know for sure you actually are you – so, it may want to verify who you &lt;em&gt;actually&lt;/em&gt; are, usually by sending a magic link to your email or phone number. Note that the application doesn’t have to do this because it’s not required via the protocol, but it will likely want to so it can communicate with you.&lt;/li&gt;
&lt;li&gt;You click on the link in the message, and the website knows that you actually are the person on the other side of that identifier. Now you are verified by the site.&lt;/li&gt;
&lt;li&gt;The next time you want to login, you go to the site and give your identifier (email, phone number..).&lt;/li&gt;
&lt;li&gt;The site sends you a known chunk of data as a challenge&lt;/li&gt;
&lt;li&gt;You device then signs this challenge with your private key and sends it back.&lt;/li&gt;
&lt;li&gt;The site decrypts the data with your public key. If what you sent back matches what the site sent, they you are authenticated.&lt;/li&gt;
&lt;/ol&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpkm9drogxsf6ry84stds.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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpkm9drogxsf6ry84stds.png" alt="The WebAuthn Process from a user's perspective"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that’s a lot of steps and looks pretty complicated, but most of it happens behind the scenes and is done by the &lt;a href="https://www.w3.org/TR/webauthn-2/" rel="noopener noreferrer"&gt;implementation of WebAuthn&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;But more importantly, it’s really simple for your users.  All they have to supply is a press on a fingerprint reader or a FaceID impression or some other “thing that you are”.  The code does the rest. It works great, is very, very secure and happens quickly and easily. No fumbling around with passwords, no bringing up authenticator applications, no checking your email or texts, and no worries about compromise.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How Do Passkeys Fit In?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;At it’s heart, a &lt;a href="https://passage.id/post/a-look-at-passkeys" rel="noopener noreferrer"&gt;passkey&lt;/a&gt; is really just the private key that gets created for every place a user logs in.  That passkey is securely stored on your phone within &lt;a href="https://trustedcomputinggroup.org/resource/trusted-platform-module-tpm-summary/" rel="noopener noreferrer"&gt;a “Trusted Platform Module” or TPM&lt;/a&gt;.  A TPM is a special chip now included with most modern devices and computers.  For example, it’s required to be present in order for Windows 11 to be installed.  The TPM is excessively difficult to compromise, even if a nefarious actor gets possession of your phone.&lt;/p&gt;

&lt;p&gt;The nice part about passkeys is that they can be shared amongst different devices, both within and (eventually) between ecosystems. Google, Microsoft, and Apple have figured out a way to securely save those passkeys within their eco–systems so you can even share them between devices.  There is even a way to move from one platform to another.&lt;/p&gt;

&lt;p&gt;For instance, if you are a totally-committed Apple person, you can log in to a site one time on your iPhone with a passkey, and then that passkey is automatically shared between all of your Apple devices.&lt;/p&gt;

&lt;p&gt;If you are a “mixed” person and have a MacBook and an Android phone, you can transfer your login from your MacBook to your Android phone via a QR Code.  The process is quite secure, and it uses Bluetooth LE to ensure that the device displaying the QR Code and the device reading the QR Code are in close proximity to each other.&lt;/p&gt;

&lt;p&gt;In addition, your Android phone creates a new passkey during the process that is then shareable across the Google ecosystem.  You can migrate your login to a Windows device using the same system.&lt;/p&gt;

&lt;p&gt;The bonus here is that if you lose or upgrade your phone, all your passkeys are immediately available on your new device without any hassle.&lt;/p&gt;

&lt;p&gt;So that is how it all works.  But as before, this raises questions. “Is this more secure?” is probably one that comes up.  And that will be covered in my next post.&lt;/p&gt;

</description>
      <category>authentication</category>
      <category>passwordless</category>
      <category>security</category>
      <category>login</category>
    </item>
    <item>
      <title>A Path Beyond Passwords</title>
      <dc:creator>PassageNick</dc:creator>
      <pubDate>Wed, 07 Sep 2022 17:36:02 +0000</pubDate>
      <link>https://dev.to/passagenick/a-path-beyond-passwords-3a2a</link>
      <guid>https://dev.to/passagenick/a-path-beyond-passwords-3a2a</guid>
      <description>&lt;p&gt;Passwords have been around a long time.  They are ubiquitous. But does anyone really like them?  &lt;/p&gt;

&lt;p&gt;Users don’t like them. Developers don’t like them.  Companies spend millions of dollars every year working to prevent password compromises.  Worse, many companies suffer password-compromised attacks from hackers, resulting in millions of dollars in losses and bad publicity.  Over 80% of all security breaches are the result of a compromised password. &lt;/p&gt;

&lt;p&gt;Despite the increasing sophistication of password-based systems, it's just hassle and risk and no fun wherever you turn. &lt;/p&gt;

&lt;p&gt;But fortunately, there is a way forward.  In this series of articles, I’ll talk about why passwords are problematic and then discuss what is being done to allow us to move past passwords into a passwordless – and vastly more secure – future.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Short History of Passwords
&lt;/h2&gt;

&lt;p&gt;Password technology has actually come a long way.  I’ve been around long enough to remember when the only way people would protect things on the Internet was with &lt;a href="https://en.wikipedia.org/wiki/Basic_access_authentication"&gt;Basic Authentication&lt;/a&gt;.  Here’s how it worked according to Wikipedia:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In basic HTTP authentication, a request contains a header field in the form of &lt;code&gt;Authorization: Basic &amp;amp;lt;credentials&amp;gt;&lt;/code&gt;, where credentials is the &lt;a href="https://en.wikipedia.org/wiki/Base64"&gt;Base64&lt;/a&gt; encoding of ID and password joined by a single colon &lt;code&gt;:&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Given that Base64 is an encoding and not encryption, you were basically sending the information in the clear for anyone to see.  Using it with HTTPS can help, but in the end, Basic Authentication was, well, useless.  Naturally, bad guys soon made Basic Authentication pointless.&lt;/p&gt;

&lt;p&gt;So next, websites started  implementing their own authentication, storing usernames and passwords in their database. This of course meant that any rogue employee could see your password, and that hacking the database meant access to every user’s password in plain text.    &lt;/p&gt;

&lt;p&gt;Then the good idea of hashing and salting passwords for storage came about. Hashing and salting provides a one-way, unique encoding of your password, allowing sites to store the result, repeat the process, and compare the results when you login. It works well, and the site doesn’t end up knowing your password.  &lt;/p&gt;

&lt;p&gt;With this, hackers started doing “phishing,” or tricking users into typing their credentials into convincing but fake websites.  &lt;/p&gt;

&lt;p&gt;The next step was multifactor authentication (MFA).  You are likely familiar with this.  It is the process of providing more information than a password – something you know and something you have – to the authenticating entity, typically a token – very often that six-digit number from an authentication application.  &lt;/p&gt;

&lt;p&gt;Currently, this is the de facto standard for authentication.  MFA is effective at increasing the security of user accounts.  However, phishing attacks have gotten more sophisticated, and &lt;a href="https://www.zdnet.com/article/hackers-are-finding-ways-around-multi-factor-authentication-heres-what-to-watch-for/"&gt;even authentication processes involving MFA can be hacked&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;In the end, even with our best efforts to make passwords safe and secure, passwords remain a significant attack vector for bad actors and a hassle for users, IT departments, and developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hassle for Users
&lt;/h2&gt;

&lt;p&gt;Our users – who, remember, are very often our customers – have to take an active and often challenging role in the whole password process.  We put a lot of the burden for security on them, and they don’t always take it seriously.  We end up trusting them to protect access to our resources.&lt;/p&gt;

&lt;p&gt;Good password hygiene is difficult and tedious, and people very often don’t follow all the rules.  Many reuse passwords across different websites.  (Be honest, you have very probably done this, right?)  Some use easy-to-figure-out password variations.  Others even use passwords that are &lt;a href="https://techcult.com/most-common-passwords/"&gt;shockingly simple to guess like “password123” or “qwerty&lt;/a&gt;”.  They don’t change their passwords from the default.  They write them &lt;a href="https://www.businessinsider.com/hawaii-emergency-agency-password-discovered-in-photo-sparks-security-criticism-2018-1"&gt;on sticky notes attached to their monitors&lt;/a&gt;. They let password-stealing malware get installed on their computers.  The list goes on.&lt;/p&gt;

&lt;p&gt;And as password management becomes more complex, users have to turn their attention away from where you want it.  They end up having to go to a separate application, logging in there (if they can remember that password!) and then coming back to your site with their password.  Or with MFA, they have to leave your website to retrieve a timed token from an authenticator application or a text.  Either way, it’s a bother and an attention diverter.&lt;/p&gt;

&lt;p&gt;And of course, all this creates friction for your users that can deter them from accessing a website.  All of us have probably looked at a long list of esoteric password requirements and abandoned our attempt to register.  Too strict, and users don’t like it. Too simple, and you risk compromise.  And nobody wants to make things tough on customers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hassle for Developers
&lt;/h2&gt;

&lt;p&gt;Authentication is always a concern for developers. While many choose to roll their own solutions, there is always the risk that their level of expertise is not up to the task of filling every crevice and corner case. &lt;/p&gt;

&lt;p&gt;In addition, pre-packaged solutions exist for most frameworks.  This type of solution is usually a safer bet, but developers always don’t know all of the implementation details, meaning they can’t be sure that a configuration change doesn’t create a security issue.  And a password-based system, no matter how well implemented, still remains vulnerable to the risks outlined above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Passwords Don’t Scale
&lt;/h2&gt;

&lt;p&gt;We’ve talked about the vulnerabilities of passwords. Another important thing to note about passwords is that they really don’t scale.  When your user base is small, the attack surface is small.  But the more customers log into your site, the more likely it is that one of them will make a mistake and get phished.  In addition, the more users you have, the more effective a password spraying attack becomes. Growth is good, but with increased growth comes increased risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Necessary Evil (for now)
&lt;/h2&gt;

&lt;p&gt;In the end, passwords don’t make anyone happy. The difficulty of proper password use, the surprising ease with which passwords, and even MFA, can be compromised, as well as the friction created by common authentication methods all make for a system that is ripe for disruption.  &lt;/p&gt;

&lt;p&gt;Someone ought to do something about this, don’t you think?. Good thing someone has.&lt;/p&gt;

&lt;p&gt;Coming next:  Goodbye Passwords, Hello Passkeys&lt;/p&gt;

</description>
      <category>passwordless</category>
      <category>authentication</category>
      <category>passkey</category>
    </item>
  </channel>
</rss>
