uibee 1.6.0 → 1.6.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.
@@ -1,3 +1,3 @@
1
1
  import { NextResponse } from 'next/server';
2
2
  import type { AuthLogoutProps } from 'uibee/utils';
3
- export default function AuthLogout({ request, frontendURL }: AuthLogoutProps): Promise<NextResponse<unknown>>;
3
+ export default function AuthLogout({ frontendURL }: AuthLogoutProps): Promise<NextResponse<unknown>>;
@@ -1,6 +1,5 @@
1
1
  import { NextResponse } from 'next/server';
2
- export default async function AuthLogout({ request, frontendURL }) {
3
- console.log(request.url);
2
+ export default async function AuthLogout({ frontendURL }) {
4
3
  const response = NextResponse.redirect(new URL('/', frontendURL));
5
4
  // Remove all authentication cookies
6
5
  const cookiesToRemove = [
@@ -1,3 +1,3 @@
1
1
  import { NextResponse } from 'next/server';
2
2
  import type { AuthTokenProps } from 'uibee/utils';
3
- export default function AuthToken({ request, frontendURL }: AuthTokenProps): Promise<NextResponse<unknown>>;
3
+ export default function AuthToken({ req, frontendURL }: AuthTokenProps): Promise<NextResponse<unknown>>;
@@ -1,6 +1,6 @@
1
1
  import { NextResponse } from 'next/server';
2
- export default async function AuthToken({ request, frontendURL }) {
3
- const url = new URL(request.url);
2
+ export default async function AuthToken({ req, frontendURL }) {
3
+ const url = new URL(req.url);
4
4
  const token = url.searchParams.get('access_token');
5
5
  const btg = url.searchParams.get('btg');
6
6
  if (!token) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uibee",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Shared components, functions and hooks for reuse across Login projects",
5
5
  "homepage": "https://github.com/Login-Linjeforening-for-IT/uibee#readme",
6
6
  "bugs": {
@@ -48,7 +48,7 @@ declare module 'uibee/utils' {
48
48
  }
49
49
 
50
50
  export interface AuthTokenProps {
51
- request: NextRequest
51
+ req: NextRequest
52
52
  frontendURL: string
53
53
  }
54
54
  export interface AuthLogoutProps {
@@ -1,8 +1,7 @@
1
1
  import { NextResponse } from 'next/server'
2
2
  import type { AuthLogoutProps } from 'uibee/utils'
3
3
 
4
- export default async function AuthLogout({ request, frontendURL }: AuthLogoutProps) {
5
- console.log(request.url)
4
+ export default async function AuthLogout({ frontendURL }: AuthLogoutProps) {
6
5
  const response = NextResponse.redirect(new URL('/', frontendURL))
7
6
 
8
7
  // Remove all authentication cookies
@@ -1,8 +1,8 @@
1
1
  import { NextResponse } from 'next/server'
2
2
  import type { AuthTokenProps } from 'uibee/utils'
3
3
 
4
- export default async function AuthToken({ request, frontendURL }: AuthTokenProps) {
5
- const url = new URL(request.url)
4
+ export default async function AuthToken({ req, frontendURL }: AuthTokenProps) {
5
+ const url = new URL(req.url)
6
6
  const token = url.searchParams.get('access_token')
7
7
  const btg = url.searchParams.get('btg')
8
8
  if (!token) {