Svelte also please :pray: :upside_down_face:
# descope-updates
m
Svelte also please ๐Ÿ™ ๐Ÿ™ƒ
m
on our backlog ๐Ÿ™‚ Do you use Auth.js BTW ? Because you could use Auth.js with Sveltekit
s
im trying to get it working with auth.js but keep running into issues.. i followed the instructions on the descope page on auth.js but still i get error..
d
Hi @Stripey Horse, will you have time for a short session to understand the problem?
m
@Meir Wahnon no we havenโ€™t used it yet. Let me explore. Supabase has the most straightforward integration of all the SDKโ€™s for svelte. React is an even playing ground for everyone though.
t
Hi All ๐Ÿ‘‹ Just created a SvelteKit example with auth.js based on the following example app Adding a short video and the auth.js configuration snippet (note Svelte version is 3.55.0):
Copy code
import { SvelteKitAuth } from "@auth/sveltekit"

export const handle = SvelteKitAuth({
  providers: [ {
      id: "descope",
      name: "Descope",
      type: "oidc",
      issuer: "https://api.descope.com/P2M8KoUuBlxu5yKzyZr01WfpWAms",
      clientId: "P2M8KoUuBlxu5yKzyZr01WfpWAms", // Your Descope Project ID
      clientSecret: 'K2SK********', // An access key created in your Descope project
      checks: ["pkce", "state"],
    }
  ],
})
Please let us know if this fulfill your requirements or if any issue raises.
๐Ÿ™Œ 1
๐Ÿ˜Ž 1
๐Ÿ‘ 1
s
thank you. i will give it a look.
quick question.. im still having issues. I have my project setup just like the above. Its using my signup-or-in flow which is great. it has a enchanted link.. this is the error im getting: InvalidCheck: Random state values did not match. Expected: {STRING}. Got: undefined my enchanted link callback is http://localhost:5173/auth/callback/descope my flow hosting URL is https://auth.descope.io/P2RLA9Bz8Z6brrqPZN8X9e42CAfC
d
Hi, in case you are using flow, you donโ€™t have to specify enchanted link callback. Can you try without it? Do you mind to have a short session so we can understand the issue better?
s
a short session would be great..
FIXED. thanks @Doron Sharon issue was my Approved Domains. (Settings -> Project). I added auth.descope.io here and it works a treat.
๐Ÿ™Œ 3