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.
- NPM Package -
@cntr/sveltekit
- Logto Application setup
Assuming you already have an instance of Logto deployed, you'll need to create a
SPA Application
inside Logto and use theApp ID
andDeployment URL
from it.- How to deploy Logto - Local development insance or Production deployment
# 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
If the above steps were sucessful, then just run the following command to run the project:
pnpm dev # or npm run dev