@authaz/next 1.0.5 → 1.0.6
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.
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -94,7 +94,7 @@ const createAuthazHandler = (config) => {
|
|
|
94
94
|
};
|
|
95
95
|
const afterLoginUrl = config.afterLoginUrl || "/";
|
|
96
96
|
const afterLogoutUrl = config.afterLogoutUrl || "/";
|
|
97
|
-
const authazDomain = config.authazDomain || "https://authaz.io";
|
|
97
|
+
const authazDomain = config.authazDomain || "https://api.authaz.io";
|
|
98
98
|
const fixedRedirectUri = config.redirectUri;
|
|
99
99
|
const isDebug = config.debug || false;
|
|
100
100
|
const apiKey = config.apiKey || config.clientSecret;
|
|
@@ -232,6 +232,9 @@ const createAuthazHandler = (config) => {
|
|
|
232
232
|
log("Getting current user");
|
|
233
233
|
const accessToken = (await getCookieStore()).get(COOKIE_NAMES.ACCESS_TOKEN)?.value;
|
|
234
234
|
if (!accessToken) return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
|
235
|
+
logError("authazDomain", authazDomain);
|
|
236
|
+
logError("accessToken", accessToken);
|
|
237
|
+
logError("apiKey", apiKey);
|
|
235
238
|
const userinfo = await fetchUserinfo(authazDomain, accessToken, apiKey);
|
|
236
239
|
if (!userinfo) {
|
|
237
240
|
logError("Failed to fetch userinfo");
|