@authly/sdk 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,9 +19,9 @@ interface IAuthorizeUrlOptions {
|
|
|
19
19
|
readonly codeChallenge: string;
|
|
20
20
|
/**
|
|
21
21
|
* @summary The PKCE code challenge method.
|
|
22
|
-
* @example "
|
|
22
|
+
* @example "s256"
|
|
23
23
|
*/
|
|
24
|
-
readonly codeChallengeMethod?: "
|
|
24
|
+
readonly codeChallengeMethod?: "s256" | "plain";
|
|
25
25
|
/**
|
|
26
26
|
* @summary The requested scopes.
|
|
27
27
|
* @example "openid profile email"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
"use client";
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.AuthlyCallback = void 0;
|
|
4
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -15,11 +16,15 @@ const AuthlyCallback = ({ onSuccess = "/", onFailure = "/login", navigate }) =>
|
|
|
15
16
|
const params = new URLSearchParams(window.location.search);
|
|
16
17
|
const code = params.get("code");
|
|
17
18
|
const state = params.get("state");
|
|
19
|
+
console.log("[AuthlyCallback] Processing callback...", { code: !!code, state: !!state });
|
|
18
20
|
if (!code || !state) {
|
|
21
|
+
console.warn("[AuthlyCallback] Missing code or state parameters.");
|
|
19
22
|
return;
|
|
20
23
|
}
|
|
21
24
|
try {
|
|
25
|
+
console.log("[AuthlyCallback] Exchanging token...");
|
|
22
26
|
await client.exchangeToken(params);
|
|
27
|
+
console.log("[AuthlyCallback] Token exchanged successfully.");
|
|
23
28
|
await refresh();
|
|
24
29
|
if (navigate) {
|
|
25
30
|
navigate(onSuccess);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authly/sdk",
|
|
3
3
|
"description": "A library for building authentication systems using Authly.",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Anvoria",
|
|
7
7
|
"url": "https://github.com/Anvoria"
|
|
@@ -84,14 +84,11 @@
|
|
|
84
84
|
"jose": "^6.1.3"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"react": ""
|
|
87
|
+
"react": ">=18.0.0"
|
|
88
88
|
},
|
|
89
89
|
"peerDependenciesMeta": {
|
|
90
90
|
"react": {
|
|
91
91
|
"optional": true
|
|
92
|
-
},
|
|
93
|
-
"next": {
|
|
94
|
-
"optional": true
|
|
95
92
|
}
|
|
96
93
|
}
|
|
97
94
|
}
|