Workshop: 1 day
Authentication for Svelte & SvelteKit
Workshop description
Most real-world applications provide some means for users to authenticate – either to get access to the application at all, or to get access to specific functionality or data within the application. Since authentication is a critical topic though, it's important to get it right. In this workshop, we cover everything one needs to know to implement authentication in Svelte and SvelteKit so that it's functional, secure, and maintainable.
The Basics of Authentication
We'll start with a bit of theory, looking into what authentication is, what the options are to implement authentication in web apps and what the relevant security aspects are to keep in mind.
The Demo Project
We continue by setting up a demo project we'll be using throughout the workshop to set up a full authentication system.
Username & Password
We'll build basic authentiation via a username and password first as a simple and straight forward means for users to login.
OAuth
Next, we'll move to OAuth, which most real-world applications are likely to use. We'll look into the theory behind the approach and implement authentication via an OAuth provider in the demo project.
Application Concerns
We end by looking into application concerns around authentication like deciding whether a user is currently logged in, and rendering the according UI, seamlessly moving the authentication state between the browser and the server side of a SvelteKit application, or persisting the authentication state beyond refreshs.