lemon-refrigerator-38207
06/27/2023, 2:33 PMUncaught TypeError: Descope is not a function
. The JS line is -> const sdk = Descope({ projectId: "ID", persistTokens: true });
. Anyone else have this issue. I can see that Descope
is instantiated as I can view it in the JS console. This is basically the code for every example so I am a little baffled. I get the same thing when I do a simple CodePen. Thanks!square-vr-55083
06/27/2023, 2:48 PMsquare-vr-55083
06/27/2023, 2:49 PMlemon-refrigerator-38207
06/27/2023, 3:12 PM<script>
const sdk = Descope({ projectId: "<project id>", persistTokens: true });
.....
</script>
From this section -> https://docs.descope.com/knowledgebase/descopeflows/descopewebflow/descopewebflow/#handing-redirect-if-not-authenticatedsquare-vr-55083
06/27/2023, 3:15 PMsquare-vr-55083
06/27/2023, 3:17 PMlemon-refrigerator-38207
06/27/2023, 3:20 PMsquare-vr-55083
06/27/2023, 3:55 PMsquare-vr-55083
06/27/2023, 3:56 PMsquare-vr-55083
06/27/2023, 3:56 PMdazzling-oyster-96577
06/27/2023, 3:57 PMlemon-refrigerator-38207
06/27/2023, 4:18 PM<script>
const sdk = Descope.default({ projectId: "<project id>", persistTokens: true });
.....
</script>
lemon-refrigerator-38207
06/27/2023, 4:20 PMsquare-vr-55083
06/27/2023, 4:23 PMlemon-refrigerator-38207
06/27/2023, 6:27 PMDescope.default
so I am unblocked but this is not consistent with your docs so ...square-vr-55083
06/27/2023, 6:30 PMlatest
SDK , that makes it not working without the .default
we are fixing it now
also changing SDK version to latest released (1.3.2
) will solve thatlemon-refrigerator-38207
06/27/2023, 6:52 PMsquare-vr-55083
06/27/2023, 6:55 PMDescope.default
will not work
looping in @great-diamond-35515 to update before that so your app won't breakgreat-diamond-35515
06/27/2023, 7:31 PM1.3.0
the fix will be avaialble in the next few hours, in the meantime I suggest to use 1.2.9
in general we descourage to use @latest
tag (on any production dependency) and use a constant version, we will update the docs accordingly
apologies for the inconveniencelemon-refrigerator-38207
06/27/2023, 7:38 PMlemon-refrigerator-38207
06/27/2023, 7:39 PM1.2.9
and removed .default
and it is working fine now.great-diamond-35515
06/27/2023, 9:41 PM1.3.3
salmon-night-88354
06/27/2023, 9:44 PMsdk = Descope.default...
leaving it just sdk = Descope...