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

casdoor-js-sdk

Package Overview
Dependencies
Maintainers
0
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

casdoor-js-sdk - npm Package Compare versions

Comparing version 0.14.0 to 0.15.0

1

lib/cjs/sdk.d.ts

@@ -167,3 +167,4 @@ import ITokenResponse from "js-pkce/dist/ITokenResponse";

};
refreshAccessToken(refreshToken: string): Promise<ITokenResponse>;
}
export default Sdk;

@@ -183,3 +183,6 @@ "use strict";

}
refreshAccessToken(refreshToken) {
return this.pkce.refreshAccessToken(refreshToken);
}
}
exports.default = Sdk;

@@ -167,3 +167,4 @@ import ITokenResponse from "js-pkce/dist/ITokenResponse";

};
refreshAccessToken(refreshToken: string): Promise<ITokenResponse>;
}
export default Sdk;

@@ -181,3 +181,6 @@ // Copyright 2021 The Casdoor Authors. All Rights Reserved.

}
refreshAccessToken(refreshToken) {
return this.pkce.refreshAccessToken(refreshToken);
}
}
export default Sdk;

2

package.json
{
"name": "casdoor-js-sdk",
"version": "0.14.0",
"version": "0.15.0",
"description": "Javascript client SDK for Casdoor",

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

@@ -221,2 +221,13 @@ # casdoor-js-sdk

#### Refresh access token
You could use a refresh token, to get a new token from the oauth server when token expired.
```typescript
sdk.refreshAccessToken(refreshToken).then((resp) => {
const token = resp.access_token;
// Do stuff with new access token
});
```
#### A note on Storage

@@ -223,0 +234,0 @@ By default, this package will use sessionStorage to persist the pkce_state. On (mostly) mobile devices there's a higher chance users are returning in a different browser tab. E.g. they kick off in a WebView & get redirected to a new tab. The sessionStorage will be empty there.

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