From 0d73205a96f300fe611e32412425ba62fa09da82 Mon Sep 17 00:00:00 2001 From: Kevin J Gao <32936811+gaokevin1@users.noreply.github.com> Date: Fri, 9 Aug 2024 11:44:34 -0700 Subject: [PATCH] fix(providers): update Descope docs, tweak default config (#11377) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Updated Descope Docs * Update descope.mdx * Update descope.mdx * Update descope.mdx * Update descope.ts * Update descope.ts --------- Co-authored-by: Nico Domino Co-authored-by: Balázs Orbán --- docs/pages/getting-started/providers/descope.mdx | 5 ++--- packages/core/src/providers/descope.ts | 14 ++++---------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/docs/pages/getting-started/providers/descope.mdx b/docs/pages/getting-started/providers/descope.mdx index 3d9ea92fff..5e3d8dd44f 100644 --- a/docs/pages/getting-started/providers/descope.mdx +++ b/docs/pages/getting-started/providers/descope.mdx @@ -7,7 +7,7 @@ import { Code } from "@/components/Code" ## Resources -- [Descope OIDC](https://docs.descope.com/customize/auth/oidc) +- [Descope OIDC](https://docs.descope.com/manage/idpapplications/oidc/) - [Descope Flows](https://docs.descope.com/customize/flows) ## Setup @@ -43,7 +43,6 @@ https://example.com/auth/callback/descope ``` AUTH_DESCOPE_ID AUTH_DESCOPE_SECRET -AUTH_DESCOPE_ISSUER ``` ### Configuration @@ -51,7 +50,7 @@ AUTH_DESCOPE_ISSUER Follow these steps: 1. Log into the [Descope console](https://app.descope.com) -2. Follow the [OIDC instructions](https://docs.descope.com/customize/auth/oidc) +2. Follow the [OIDC instructions](https://docs.descope.com/manage/idpapplications/oidc/) Add the required environment variables from above to your `.env.local` file. diff --git a/packages/core/src/providers/descope.ts b/packages/core/src/providers/descope.ts index a2c0eb80a9..601c3f6fe3 100644 --- a/packages/core/src/providers/descope.ts +++ b/packages/core/src/providers/descope.ts @@ -50,14 +50,7 @@ export interface DescopeProfile { * import Descope from "@auth/core/providers/descope" * * const request = new Request(origin) - * const response = await Auth(request, { - * providers: [ - * Descope({ - * clientId: DESCOPE_ID, - * clientSecret: DESCOPE_SECRET, - * }), - * ], - * }) + * const response = await Auth(request, { providers: [Descope] }) * ``` * * ### Configuring Descope @@ -71,8 +64,8 @@ export interface DescopeProfile { * * Get the following from the Descope's console: * ``` - * DESCOPE_ID="" # Descope's Issuer can be found in "Authentication Methods > SSO > Identity Provider" (Can also be taken from "Project > Project ID") - * DESCOPE_SECRET="" # Manage > Access Keys + * AUTH_DESCOPE_ID="" # Descope's Issuer can be found in "Authentication Methods > SSO > Identity Provider" (Can also be taken from "Project > Project ID") + * AUTH_DESCOPE_SECRET="" # Manage > Access Keys * ``` * * ### Resources @@ -108,6 +101,7 @@ export default function Descope( bg: "#1C1C23", text: "#ffffff", }, + checks: ["pkce", "state"], options: config, } }