@authaz/next 1.0.4 → 1.0.5
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.d.ts +1 -1
- package/dist/index.js +4 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -193,7 +193,7 @@ declare const requireAuth: (loginPath?: string) => Promise<void>;
|
|
|
193
193
|
* import { requireUser } from '@authaz/next';
|
|
194
194
|
*
|
|
195
195
|
* const helpers = requireUser({
|
|
196
|
-
* authazDomain: 'https://authaz.
|
|
196
|
+
* authazDomain: 'https://authaz.io',
|
|
197
197
|
* apiKey: process.env.AUTHAZ_API_KEY!,
|
|
198
198
|
* });
|
|
199
199
|
*
|
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.
|
|
97
|
+
const authazDomain = config.authazDomain || "https://authaz.io";
|
|
98
98
|
const fixedRedirectUri = config.redirectUri;
|
|
99
99
|
const isDebug = config.debug || false;
|
|
100
100
|
const apiKey = config.apiKey || config.clientSecret;
|
|
@@ -314,7 +314,7 @@ const isAuthenticated = async () => {
|
|
|
314
314
|
* Creates helper functions that require the authazDomain for API calls.
|
|
315
315
|
*/
|
|
316
316
|
const createAuthazHelpers = (config) => {
|
|
317
|
-
const authazDomain = config.authazDomain || "https://authaz.
|
|
317
|
+
const authazDomain = config.authazDomain || "https://authaz.io";
|
|
318
318
|
const apiKey = config.apiKey || config.clientSecret;
|
|
319
319
|
const getUser = async () => {
|
|
320
320
|
const accessToken = (await getCookieStore()).get(COOKIE_NAMES.ACCESS_TOKEN)?.value;
|
|
@@ -413,7 +413,7 @@ const requireAuth = async (loginPath = "/api/auth/login") => {
|
|
|
413
413
|
* import { requireUser } from '@authaz/next';
|
|
414
414
|
*
|
|
415
415
|
* const helpers = requireUser({
|
|
416
|
-
* authazDomain: 'https://authaz.
|
|
416
|
+
* authazDomain: 'https://authaz.io',
|
|
417
417
|
* apiKey: process.env.AUTHAZ_API_KEY!,
|
|
418
418
|
* });
|
|
419
419
|
*
|
|
@@ -424,7 +424,7 @@ const requireAuth = async (loginPath = "/api/auth/login") => {
|
|
|
424
424
|
* ```
|
|
425
425
|
*/
|
|
426
426
|
const requireUser = (config) => {
|
|
427
|
-
const authazDomain = config.authazDomain || "https://authaz.
|
|
427
|
+
const authazDomain = config.authazDomain || "https://authaz.io";
|
|
428
428
|
const apiKey = config.apiKey || config.clientSecret;
|
|
429
429
|
const loginPath = config.loginPath || "/api/auth/login";
|
|
430
430
|
const getOrRedirect = async () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "@authaz",
|
|
3
3
|
"name": "@authaz/next",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "NextJS authaz SDK",
|
|
7
7
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"next": ">=15",
|
|
41
41
|
"react": ">=17",
|
|
42
|
-
"@authaz/sdk": "^1.2.
|
|
42
|
+
"@authaz/sdk": "^1.2.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@jest/globals": "30.2.0",
|