react-oauth2-code-pkce
Advanced tools
Comparing version 1.2.2-c to 1.2.3
import React from 'react'; | ||
import { IAuthProvider } from "./Types"; | ||
export declare const AuthContext: React.Context<{}>; | ||
import { IAuthContext, IAuthProvider } from "./Types"; | ||
export declare const AuthContext: React.Context<IAuthContext>; | ||
export declare const AuthProvider: ({ authConfig, children }: IAuthProvider) => JSX.Element; |
@@ -34,3 +34,3 @@ "use strict"; | ||
var validateAuthConfig_1 = require("./validateAuthConfig"); | ||
exports.AuthContext = (0, react_1.createContext)({}); | ||
exports.AuthContext = (0, react_1.createContext)({ token: '', logOut: function () { return null; }, error: null }); | ||
var AuthProvider = function (_a) { | ||
@@ -37,0 +37,0 @@ var authConfig = _a.authConfig, children = _a.children; |
@@ -1,2 +0,2 @@ | ||
import { ReactChildren } from "react"; | ||
import { ReactNode } from "react"; | ||
export declare type TTokenData = { | ||
@@ -8,4 +8,11 @@ exp: number; | ||
authConfig: TAuthConfig; | ||
children: ReactChildren; | ||
children: ReactNode; | ||
} | ||
export interface IAuthContext { | ||
token: string; | ||
logOut: () => void; | ||
error: any; | ||
tokenData?: TTokenData | null; | ||
idToken?: string; | ||
} | ||
export declare type TAuthConfig = { | ||
@@ -12,0 +19,0 @@ clientId: string; |
{ | ||
"name": "react-oauth2-code-pkce", | ||
"version": "1.2.2c", | ||
"version": "1.2.3", | ||
"description": "Plug-and-play react package for OAuth2 Authorization Code flow with PKCE", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
26552
483
1
1