New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@civic/auth

Package Overview
Dependencies
Maintainers
0
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@civic/auth - npm Package Compare versions

Comparing version 0.2.1-beta.0 to 0.2.1-beta.1

3

CHANGELOG.md
# 0.2.1 Server getTokens
- expose server/getTokens function
- remove unused SDK exports
# 0.2.0 Refresh and Logout improvements

@@ -5,0 +6,0 @@ - improve the token auto-refresh funcionality

export { createCivicAuthPlugin } from "../nextjs/config.js";
export { getUser } from "../nextjs/GetUser.js";
export { handler } from "../nextjs/routeHandler.js";
export { createTokenCookies, createUserInfoCookie, clearAuthCookies, NextjsCookieStorage, NextjsClientStorage, } from "../nextjs/cookies.js";
export { NextjsCookieStorage, NextjsClientStorage, } from "../nextjs/cookies.js";
export type { AuthConfig, CookiesConfigObject, AuthConfigWithDefaults, DefinedAuthConfig, } from "../nextjs/config.js";
export { CivicNextAuthProvider as CivicAuthProvider, type NextCivicAuthProviderProps as AuthProviderProps, } from "../nextjs/providers/NextAuthProvider.js";
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CivicAuthProvider = exports.NextjsClientStorage = exports.NextjsCookieStorage = exports.clearAuthCookies = exports.createUserInfoCookie = exports.createTokenCookies = exports.handler = exports.getUser = exports.createCivicAuthPlugin = void 0;
exports.CivicAuthProvider = exports.NextjsClientStorage = exports.NextjsCookieStorage = exports.handler = exports.getUser = exports.createCivicAuthPlugin = void 0;
const index_js_1 = require("../shared/index.js");

@@ -13,5 +13,2 @@ (0, index_js_1.printVersion)();

var cookies_js_1 = require("../nextjs/cookies.js");
Object.defineProperty(exports, "createTokenCookies", { enumerable: true, get: function () { return cookies_js_1.createTokenCookies; } });
Object.defineProperty(exports, "createUserInfoCookie", { enumerable: true, get: function () { return cookies_js_1.createUserInfoCookie; } });
Object.defineProperty(exports, "clearAuthCookies", { enumerable: true, get: function () { return cookies_js_1.clearAuthCookies; } });
Object.defineProperty(exports, "NextjsCookieStorage", { enumerable: true, get: function () { return cookies_js_1.NextjsCookieStorage; } });

@@ -18,0 +15,0 @@ Object.defineProperty(exports, "NextjsClientStorage", { enumerable: true, get: function () { return cookies_js_1.NextjsClientStorage; } });

@@ -49,5 +49,3 @@ /**

*
* const withAuth = auth({ loginUrl = '/login' }); // or just auth();
*
* export default withAuth(async (request) => {
* export default auth(authConfig: AuthConfig ) => {
* console.log('my middleware');

@@ -54,0 +52,0 @@ * return NextResponse.next();

@@ -98,5 +98,3 @@ "use strict";

*
* const withAuth = auth({ loginUrl = '/login' }); // or just auth();
*
* export default withAuth(async (request) => {
* export default auth(authConfig: AuthConfig ) => {
* console.log('my middleware');

@@ -103,0 +101,0 @@ * return NextResponse.next();

export { useUser } from "../../reactjs/hooks/useUser.js";
export { useToken } from "../../shared/hooks/useToken.js";
export { useAuth } from "../../shared/hooks/useAuth.js";
export { useSession } from "../../shared/hooks/useSession.js";
export { useIframe } from "../../shared/hooks/useIframe.js";
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useIframe = exports.useSession = exports.useAuth = exports.useToken = exports.useUser = void 0;
exports.useToken = exports.useUser = void 0;
var useUser_js_1 = require("../../reactjs/hooks/useUser.js");

@@ -8,8 +8,2 @@ Object.defineProperty(exports, "useUser", { enumerable: true, get: function () { return useUser_js_1.useUser; } });

Object.defineProperty(exports, "useToken", { enumerable: true, get: function () { return useToken_js_1.useToken; } });
var useAuth_js_1 = require("../../shared/hooks/useAuth.js");
Object.defineProperty(exports, "useAuth", { enumerable: true, get: function () { return useAuth_js_1.useAuth; } });
var useSession_js_1 = require("../../shared/hooks/useSession.js");
Object.defineProperty(exports, "useSession", { enumerable: true, get: function () { return useSession_js_1.useSession; } });
var useIframe_js_1 = require("../../shared/hooks/useIframe.js");
Object.defineProperty(exports, "useIframe", { enumerable: true, get: function () { return useIframe_js_1.useIframe; } });
//# sourceMappingURL=index.js.map

@@ -1,9 +0,4 @@

import { type AuthStorage, type User } from "../../types.js";
import { type AuthStorage, type OAuthTokens, type User } from "../../types.js";
export declare function getUser(storage: AuthStorage): Promise<User | null>;
export declare function getTokens(storage: AuthStorage): Promise<{
authenticated: boolean;
idToken: string;
accessToken: string;
refreshToken: string | undefined;
} | null>;
export declare function getTokens(storage: AuthStorage): Promise<OAuthTokens | null>;
//# sourceMappingURL=session.d.ts.map

@@ -30,3 +30,2 @@ "use strict";

return {
authenticated: !!storageData.id_token,
idToken: storageData.id_token,

@@ -33,0 +32,0 @@ accessToken: storageData.access_token,

@@ -1,2 +0,2 @@

export declare const VERSION = "@civic/auth:0.2.1-beta.0";
export declare const VERSION = "@civic/auth:0.2.1-beta.1";
//# sourceMappingURL=version.d.ts.map

@@ -5,3 +5,3 @@ "use strict";

exports.VERSION = void 0;
exports.VERSION = "@civic/auth:0.2.1-beta.0";
exports.VERSION = "@civic/auth:0.2.1-beta.1";
//# sourceMappingURL=version.js.map

@@ -96,2 +96,7 @@ import type { TokenResponseBody } from "oslo/oauth2";

declare const tokenKeys: string[];
export type OAuthTokens = {
idToken?: string;
accessToken?: string;
refreshToken?: string;
};
type Tokens = {

@@ -98,0 +103,0 @@ [K in (typeof tokenKeys)[number]]: K extends "forwardedTokens" ? ForwardedTokens : string;

export { createCivicAuthPlugin } from "../nextjs/config.js";
export { getUser } from "../nextjs/GetUser.js";
export { handler } from "../nextjs/routeHandler.js";
export { createTokenCookies, createUserInfoCookie, clearAuthCookies, NextjsCookieStorage, NextjsClientStorage, } from "../nextjs/cookies.js";
export { NextjsCookieStorage, NextjsClientStorage, } from "../nextjs/cookies.js";
export type { AuthConfig, CookiesConfigObject, AuthConfigWithDefaults, DefinedAuthConfig, } from "../nextjs/config.js";
export { CivicNextAuthProvider as CivicAuthProvider, type NextCivicAuthProviderProps as AuthProviderProps, } from "../nextjs/providers/NextAuthProvider.js";
//# sourceMappingURL=index.d.ts.map

@@ -6,4 +6,4 @@ import { printVersion } from "../shared/index.js";

export { handler } from "../nextjs/routeHandler.js";
export { createTokenCookies, createUserInfoCookie, clearAuthCookies, NextjsCookieStorage, NextjsClientStorage, } from "../nextjs/cookies.js";
export { NextjsCookieStorage, NextjsClientStorage, } from "../nextjs/cookies.js";
export { CivicNextAuthProvider as CivicAuthProvider, } from "../nextjs/providers/NextAuthProvider.js";
//# sourceMappingURL=index.js.map

@@ -49,5 +49,3 @@ /**

*
* const withAuth = auth({ loginUrl = '/login' }); // or just auth();
*
* export default withAuth(async (request) => {
* export default auth(authConfig: AuthConfig ) => {
* console.log('my middleware');

@@ -54,0 +52,0 @@ * return NextResponse.next();

@@ -89,5 +89,3 @@ import { NextResponse } from "next/server.js";

*
* const withAuth = auth({ loginUrl = '/login' }); // or just auth();
*
* export default withAuth(async (request) => {
* export default auth(authConfig: AuthConfig ) => {
* console.log('my middleware');

@@ -94,0 +92,0 @@ * return NextResponse.next();

export { useUser } from "../../reactjs/hooks/useUser.js";
export { useToken } from "../../shared/hooks/useToken.js";
export { useAuth } from "../../shared/hooks/useAuth.js";
export { useSession } from "../../shared/hooks/useSession.js";
export { useIframe } from "../../shared/hooks/useIframe.js";
//# sourceMappingURL=index.d.ts.map
export { useUser } from "../../reactjs/hooks/useUser.js";
export { useToken } from "../../shared/hooks/useToken.js";
export { useAuth } from "../../shared/hooks/useAuth.js";
export { useSession } from "../../shared/hooks/useSession.js";
export { useIframe } from "../../shared/hooks/useIframe.js";
//# sourceMappingURL=index.js.map

@@ -1,9 +0,4 @@

import { type AuthStorage, type User } from "../../types.js";
import { type AuthStorage, type OAuthTokens, type User } from "../../types.js";
export declare function getUser(storage: AuthStorage): Promise<User | null>;
export declare function getTokens(storage: AuthStorage): Promise<{
authenticated: boolean;
idToken: string;
accessToken: string;
refreshToken: string | undefined;
} | null>;
export declare function getTokens(storage: AuthStorage): Promise<OAuthTokens | null>;
//# sourceMappingURL=session.d.ts.map
import { retrieveTokens } from "../../shared/lib/util.js";
import { parseJWT } from "oslo/jwt";
import { tokenKeys } from "../../types.js";
import { tokenKeys, } from "../../types.js";
// Function to omit keys from an object

@@ -26,3 +26,2 @@ const omitKeys = (keys, obj) => {

return {
authenticated: !!storageData.id_token,
idToken: storageData.id_token,

@@ -29,0 +28,0 @@ accessToken: storageData.access_token,

@@ -1,2 +0,2 @@

export declare const VERSION = "@civic/auth:0.2.1-beta.0";
export declare const VERSION = "@civic/auth:0.2.1-beta.1";
//# sourceMappingURL=version.d.ts.map
// This is an auto-generated file. Do not edit.
export const VERSION = "@civic/auth:0.2.1-beta.0";
export const VERSION = "@civic/auth:0.2.1-beta.1";
//# sourceMappingURL=version.js.map

@@ -96,2 +96,7 @@ import type { TokenResponseBody } from "oslo/oauth2";

declare const tokenKeys: string[];
export type OAuthTokens = {
idToken?: string;
accessToken?: string;
refreshToken?: string;
};
type Tokens = {

@@ -98,0 +103,0 @@ [K in (typeof tokenKeys)[number]]: K extends "forwardedTokens" ? ForwardedTokens : string;

{
"name": "@civic/auth",
"version": "0.2.1-beta.0",
"version": "0.2.1-beta.1",
"type": "module",

@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc