Svelte Sample App

Integrate Descope Authentication in Svelte with SvelteKit Auth by building a company landing page.

🎨 Features

  • Descope SvelteKit authentication 🔐
  • Customizable landing page.
  • Protected Profile page with SvelteKit Auth.
  • Fully responsive UI (mobile, tablet, computer).

✨ Made with...

⚙️ Setup

  1. Clone the repository:
git clone https://github.com/descope-sample-apps/svelte-sample-app.git
  1. Install dependencies:
npm install
  1. Setup environment variables:
DESCOPE_ID="YOUR_DESCOPE_PROJECT_ID"
DESCOPE_SECRET="YOUR_DESCOPE_ACCESS_KEY"
DISCOVERY_URL="YOUR_DISCOVERY_URL"
ISSUER_URL="YOUR_ISSUER_URL"
AUTH_SECRET="YOUR_AUTH_SECRET"
  • DESCOPE_ID: can be found in your Descope's account under the Project page
  • DESCOPE_SECRET: can be generated in your Descope's account under the Access Keys page
  • DISCOVERY_URL: can be found in your Descope Console under the Applications page and editing the active application
  • ISSUER_URL: can be found in your Descope's account under the Applications page and editing the active application
  • AUTH_SECRET: can be generated by the following command in your terminal (do not use the same generated value for both):
    $ openssl rand -base64 32
    
  1. Setup SSO:

Navigate to Descope Project --> Authentication methods --> Identity Provider.
To enable SSO and add Descope as an Identity Provider (IdP), we need to add our flow hosting URL:

https://auth.descope.io/<YOUR_DESCOPE_PROJECT_ID>

🔮 Running the Application

To start the application, run:

npm run dev

🚀 Deploy

⚠️ Issue Reporting

For any issues or suggestions, feel free to open an issue in the GitHub repository.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

Top categories

Loading Svelte Themes