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

@cimpress/simple-auth-wrapper

Package Overview
Dependencies
Maintainers
9
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cimpress/simple-auth-wrapper - npm Package Compare versions

Comparing version 6.3.2 to 6.4.0

lib/authorizationcodegrant.js

3

CHANGELOG.md
# Changelog
## 6.4 (2018-10-2)
Added support for the Authorization Code Grant Flow. See the [README](/README.md) for details.
## 6.3 (2018-08-28)

@@ -4,0 +7,0 @@

@@ -34,3 +34,12 @@ 'use strict';

var _authorizationcodegrant = require('./authorizationcodegrant');
Object.defineProperty(exports, 'AuthorizationCodeGrant', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_authorizationcodegrant).default;
}
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=index.js.map

4

package.json
{
"name": "@cimpress/simple-auth-wrapper",
"version": "6.3.2",
"version": "6.4.0",
"description": "A simple utility class to wrap basic Auth0 functionality",
"main": "lib/index.js",
"main": "src/index.js",
"scripts": {

@@ -7,0 +7,0 @@ "test": "jest",

@@ -106,1 +106,29 @@ # MEX Simple Auth Wrapper v. 3.0

`patchUserMetadata(userMetadata, applicationKey)` applicationKey should match what is used for get. Puts the metadata into the users UserMetadata
### Authorization Code Grant Flow
The [Authorization Code Grant Flow](https://auth0.com/docs/api-auth/tutorials/authorization-code-grant) can be used to retrieve a refresh token for a user.
```javascript
import { AuthorizationCodeGrant } from '@cimpress/simple-auth-wrapper';
const authorizationCodeGrant = new AuthorizationCodeGrant(options);
```
| Name | Type | Default | Description |
|-----------------|--------|----------------------------|---------------------------------------------------------------------------------|
| `clientID` | String | None (required) | The clientID used in the Authorization Code Grant Flow |
| `redirectRoute` | String | "" | The route Auth0 will redirect back to: `window.location.origin + redirectRoute` |
| `domain` | String | `cimpress.auth0.com` | The auth0 domain |
| `audience` | String | `https://api.cimpress.io/` | The auth0 audience |
| `scope` | String | `offline_access` | The scope which you want to request access for |
This will give you access to:
`login(options)` Starts the Authorization Code Grant Flow, redirecting the user to the centralized lock page.
| Name | Type | Default | Description |
|-----------|--------|---------|-------------------------------------------------------------------------------|
| `nextUri` | String | `/` | Takes the user through the flow and will be returned to this `nextUri` route. |
`handleAuthorization()` Resumes the authorization code grant flow. Should be called at the base of your application, or at the `redirectUri` specified to continue the flow. Returns a Promise of `{ authorizationCode, redirectUri, nextUri }`
export { default as centralizedAuth } from './centralizedauth';
export { default as UserMetadata } from './usermetadata';
export { default as Delegation } from './delegation';
export { default as AuthorizationCodeGrant } from './authorizationcodegrant';

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