Skip to content

This is an example project that shows how to use Logto with authentication with a SvelteKit project

Notifications You must be signed in to change notification settings

jay-dee7/logto-sveltekit-example

Repository files navigation

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

About

This is an example project that shows how to use Logto with authentication with a SvelteKit project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published