Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.49 KB

README.md

File metadata and controls

40 lines (27 loc) · 1.49 KB

Logto + SvelteKit Examle

This is an example SvelteKit project to demonstate how to perform authentication with Logto.

Caveat -> The library being used (@cntr/sveltekit) is in alpha stage right now and is something that just gets the job done. Please use it at your own risk. Author is not responsible for anything.

Requirements

  1. NPM Package - @cntr/sveltekit
  2. Logto Application setup Assuming you already have an instance of Logto deployed, you'll need to create a SPA Application inside Logto and use the App ID and Deployment URL from it.

Getting started with this project

# Install all the dependencies
pnpm i # or npm i

While all the dependencies are being installed, let's populate our .env file with Logto credentials.

cp env.example .env

then replace the values inside it with your Logto credentials.

PUBLIC_LOGTO_ENDPOINT is your Logto deployment url

PUBLIC_LOGTO_APP_ID is your Logto SPA application ID

Run the application

If the above steps were sucessful, then just run the following command to run the project:

pnpm dev # or npm run dev