Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wpcodevo/sveltekit-jwt-authentication
In this tutorial, we'll delve into the implementation of JSON Web Token (JWT) authentication within SvelteKit. We'll be using TypeScript along with Prisma, a popular Object-Relational Mapping (ORM) tool for Node.js.
https://github.com/wpcodevo/sveltekit-jwt-authentication
api docker jwt jwt-authentication postgresql prisma svelte sveltekit
Last synced: 24 days ago
JSON representation
In this tutorial, we'll delve into the implementation of JSON Web Token (JWT) authentication within SvelteKit. We'll be using TypeScript along with Prisma, a popular Object-Relational Mapping (ORM) tool for Node.js.
- Host: GitHub
- URL: https://github.com/wpcodevo/sveltekit-jwt-authentication
- Owner: wpcodevo
- Created: 2023-08-03T20:28:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-07T14:05:48.000Z (over 1 year ago)
- Last Synced: 2024-11-27T11:15:24.707Z (3 months ago)
- Topics: api, docker, jwt, jwt-authentication, postgresql, prisma, svelte, sveltekit
- Language: TypeScript
- Homepage: https://codevoweb.com/implement-jwt-authentication-in-sveltekit-api-routes/
- Size: 37.1 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Implement JWT Authentication in SvelteKit API Routes
In this tutorial, we'll delve into the implementation of JSON Web Token (JWT) authentication within SvelteKit. We'll be using TypeScript along with Prisma, a popular Object-Relational Mapping (ORM) tool for Node.js.

## Topics Covered
- Running the SvelteKit JWT App Locally
- Setting up the SvelteKit Project
- Setting up a PostgreSQL Database
- Optional: Using Docker
- Setting up Prisma ORM
- Connecting to Database
- Creating the Request Validation Schemas
- Signing and Verifying JSON Web Tokens
- Sign JWTs
- Verify JWTs
- Creating the SvelteKit API Endpoints
- Registering a User
- Logging in a User
- Logging out a User
- Fetching Authenticated User Data
- Protecting the API Endpoints with SvelteKit Hooks
- Testing the JWT Application
- Sign Up
- Sign In
- Accessing Protected Route
- Sign Out
- ConclusionRead the entire article here: [https://codevoweb.com/implement-jwt-authentication-in-sveltekit-api-routes/](https://codevoweb.com/implement-jwt-authentication-in-sveltekit-api-routes/)