clever-laptop-72507
06/26/2023, 5:18 AMexport const handle = SvelteKitAuth({
providers: [
{
id: "descope",
name: "Descope",
type: "oidc",
issuer: "<https://api.descope.com/ISSUER>",
clientId: "ISSUER"",
wellKnown: "<https://api.descope.com/ISSUER>"/.well-known/openid-configuration",
clientSecret: 'CLIENT_SECRET',
} satisfies OIDCConfig
]
});
im getting the following error
{
"errorCode": "E011003",
"errorDescription": "Request is invalid",
"errorMessage": "The state field is required",
"message": "The state field is required"
}
any ideas?
or if anyone has an example of using Descope flows with Sveltekit i would love to see it.ancient-motorcycle-2291
06/26/2023, 5:22 AMancient-motorcycle-2291
06/26/2023, 5:22 AMclever-laptop-72507
06/26/2023, 5:25 AMclever-laptop-72507
06/26/2023, 5:26 AMancient-motorcycle-2291
06/26/2023, 5:29 AMclever-laptop-72507
06/26/2023, 5:30 AMancient-motorcycle-2291
06/26/2023, 5:30 AMancient-motorcycle-2291
06/26/2023, 5:31 AMrapid-doctor-25622
06/29/2023, 7:46 AMFlow hosting URL
and use your projectID
. Also make sure this method is enabled.
https://auth.descope.io/PROJECT_ID?flow=sign-up-or-in
you can use different flows if you’d like. just change the sign-up-or-in with the flow you want.
Feel free to reach if any assistance is needed 👍clever-laptop-72507
07/02/2023, 5:22 AMclever-laptop-72507
07/02/2023, 9:15 AMimport { SvelteKitAuth } from "@auth/sveltekit";
import descope from "@auth/core/providers/descope"
import type { Handle } from "@sveltejs/kit";
import { AUTH_SECRET } from "$env/static/private";
export const handle = SvelteKitAuth({
providers: [
descope({
issuer: "<https://api.descope.com/P2RLA9Bz8Z6brrqPZN8X9e42CAfC>",
authorization: "<https://auth.descope.io/P2RLA9Bz8Z6brrqPZN8X9e42CAfC?flow=sign-up-or-in>",
clientId: "P2RLA9Bz8Z6brrqPZN8X9e42CAfC",
clientSecret: "SECRET"
})
],
})
clever-laptop-72507
07/02/2023, 9:18 AMissuer
and authorization
endpoint config.
with them , i get redirected to descope and get my flow page.. however when it gors bck thru the callback it fails with
http://localhost:5173/auth/error?error=CallbackRouteError
and
[auth][error][CallbackRouteError]: Read more at <https://errors.authjs.dev#callbackrouteerror>
[auth][cause]: OperationProcessingError: no authorization code in "callbackParameters"
rapid-doctor-25622
07/02/2023, 9:58 AMauthorization
should be taken automatically from your .well-known
configuration (https://api.descope.com/P2RLA9Bz8Z6brrqPZN8X9e42CAfC/.well-known/openid-configuration).
So you should be able to work without configuring it.
if it doesn’t work for some reason you can set it manually to https://api.descope.com/oauth2/v1/authorize as set in your .well-knwon
configuration