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 1.0.2 to 1.0.3

8

dist/index.es.js

@@ -260,2 +260,8 @@ import { createContext, useMemo, useEffect, createElement, useState, useContext } from 'react';

}
function useAuthSessionInfo() {
var client = useAuthClient();
if (!client)
return null;
return { hasSession: client.hasSessionToken() };
}
function useAuthAccessToken() {

@@ -274,3 +280,3 @@ var client = useAuthClient();

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

@@ -264,2 +264,8 @@ 'use strict';

}
function useAuthSessionInfo() {
var client = useAuthClient();
if (!client)
return null;
return { hasSession: client.hasSessionToken() };
}
function useAuthAccessToken() {

@@ -283,4 +289,5 @@ var client = useAuthClient();

exports.useAuthControls = useAuthControls;
exports.useAuthSessionInfo = useAuthSessionInfo;
exports.useAuthUserInfo = useAuthUserInfo;
exports.usePromiseResult = usePromiseResult;
//# sourceMappingURL=index.js.map

@@ -22,4 +22,7 @@ import * as React from 'react';

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

2

package.json
{
"name": "oidc-jwt-client",
"version": "1.0.2",
"version": "1.0.3",
"description": "Fetch JWTs for API access from oidc-jwt-provider",

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

@@ -67,2 +67,10 @@ # oidc-jwt-client

console.log('This are the claims: ', claims)
```
### Check session
To check if there is a session and for example show a loader when there's not yet one:
```javascript
const sessionInfo = useAuthSessionInfo();
console.log('There is a session started: ', sessionInfo.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