Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oidc-jwt-client

Package Overview
Dependencies
Maintainers
4
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oidc-jwt-client - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1-develop.1

5

dist/hooks.d.ts

@@ -11,5 +11,8 @@ import { AsyncState } from 'react-use/lib/useAsync';

declare function useAuthIsLoggedIn(): boolean;
declare function useAuthSessionInfo(): {
hasSession: boolean;
};
declare function useAuthAccessToken(): {
(): Promise<string | null>;
};
export { useAuthControls, useAuthUserInfo, useAuthAccessClaims, useAuthIsLoggedIn, useAuthAccessToken, };
export { useAuthControls, useAuthUserInfo, useAuthAccessClaims, useAuthIsLoggedIn, useAuthAccessToken, useAuthSessionInfo, };

7

dist/index.es.js

@@ -1121,2 +1121,7 @@ import React, { useReducer, useRef, useEffect, useLayoutEffect, useContext, useCallback, useState } from 'react';

}
function useAuthSessionInfo() {
var useStore = useOidcJwtContext().useStore;
var hasSession = useStore(function (state) { return !!state.csrfToken; });
return { hasSession: hasSession };
}
function useAuthAccessToken() {

@@ -1128,3 +1133,3 @@ var useStore = useOidcJwtContext().useStore;

export { OidcJwtProvider, useAuthAccessClaims, useAuthAccessToken, useAuthControls, useAuthIsLoggedIn, useAuthUserInfo, useOidcJwtContext };
export { OidcJwtProvider, useAuthAccessClaims, useAuthAccessToken, useAuthControls, useAuthIsLoggedIn, useAuthSessionInfo, useAuthUserInfo, useOidcJwtContext };
//# sourceMappingURL=index.es.js.map

@@ -1129,2 +1129,7 @@ 'use strict';

}
function useAuthSessionInfo() {
var useStore = useOidcJwtContext().useStore;
var hasSession = useStore(function (state) { return !!state.csrfToken; });
return { hasSession: hasSession };
}
function useAuthAccessToken() {

@@ -1141,4 +1146,5 @@ var useStore = useOidcJwtContext().useStore;

exports.useAuthIsLoggedIn = useAuthIsLoggedIn;
exports.useAuthSessionInfo = useAuthSessionInfo;
exports.useAuthUserInfo = useAuthUserInfo;
exports.useOidcJwtContext = useOidcJwtContext;
//# sourceMappingURL=index.js.map
{
"name": "oidc-jwt-client",
"version": "2.0.0",
"version": "2.0.1-develop.1",
"description": "Fetch JWTs for API access from oidc-jwt-provider",

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

@@ -76,1 +76,9 @@ # oidc-jwt-client

```
### Check if a user has a session
Checking if the user has an active session
```javascript
const { hasSession } = useAuthSessionInfo();
console.log('Does the user have a session? ', hasSession)
```

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