Skip to content
/ auth-hosting Public template

A simple Descope's flows app to be hosted for an easy and simple authentication

License

Notifications You must be signed in to change notification settings

descope/auth-hosting

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a376178 · Jan 27, 2025
Jan 27, 2025
Sep 10, 2024
Dec 24, 2024
Aug 16, 2023
Dec 10, 2024
Jul 12, 2023
Jul 12, 2023
Sep 3, 2024
Sep 10, 2024
Dec 9, 2024
Dec 9, 2024
Jul 12, 2023
Jan 27, 2025
Jul 12, 2023
Dec 9, 2024
Dec 23, 2024
Jul 12, 2023
Jan 27, 2025
Sep 26, 2023
Jun 30, 2023
Dec 24, 2023
Jul 30, 2023
Jan 27, 2025

Repository files navigation

github-header-image

Descope Authentication Hosting App

This is a React web application that runs Descope's login flows according to the project created in your Descope account.

Deployment

Deploy with Vercel

By default, the app is deployed to the Descope hosting page in https://auth.descope.io.
The main purpose is to allow easy integration for descopers implementing authentication with Descope (such as OIDC use case).

In case you want to have your own hosted page (customize styling, your own domain, etc.), you can use this repository as a template, do the relevant modification and host it (using Vercel, etc.)


Open ID Connect (OIDC) use cases in Descope

Descope allows you to integrate with your existing Identity Provider (IdP) via OpenID Connect (OIDC) or with any deployed OIDC client.
With this implementation, you can seamlessly add Descope authentication to your application utilizing any OIDC provider.

You can refer to either the main documentation on how to set it up, or you can review a few of the tutorials published that showcase how to use Descope with many major existing identity providers:


Running locally

  • yarn install
  • yarn start
  • Go to http://localhost:3000/<PROJECT_ID>

Using URL params

  • Descope's deployment: https://auth.descope.io/<PROJECT_ID>
  • Locally: http://localhost:3000/<PROJECT_ID>?flow=sign-in&debug=true

These are the different query parameters you can use:

  1. <PROJECT_ID> as part of the URL path is required to use the desired Descope's PROJECT_ID

  2. flow query parameter is optional. If none provided the default flow is sign-up-or-in

  3. tenant query parameter is optional. You can input a Tenant ID or Tenant Domain to use with this query parameter (e.g. tenant=descope.com or tenant=T2UjlUN1tJsRnrV3jnAkJ3WziaEq).

If present, then you will be able to authenticate via SSO, without having to first specify an email with an input screen in your flow.

  1. debugquery parameter is optional. If debug mode is needed usedebug=true

  2. bg query parameter is optional. If you wish to use a different background color, you can use this parameter. (ex. bg=black or bg=gray)

  3. wide query parameter is optional. If wide mode is nedded use wide=true. This will widen the flow component that is rendered, which is used for large forms made with Flow screens.

  4. theme query parameter is optional. The default value is light, but otherwise it will override the theme for your flows rendered with the SDK.

  5. style query parameter is optional. The default style in your project will be used if not defined, but this allows you to override the style for the flows rendered with the SDK.

Using .env

In case you don't want to provide the project ID as part of the URL, you can specify it as an environment variable DESCOPE_PROJECT_ID.
You can use .env file for that.
From the project root directory run: cp .env.example .env, and set your Descope Project and flow IDs.