Skip to content

A set of tools and utilities to simplify the development of Auth0 Extensions with Amazon S3.

Notifications You must be signed in to change notification settings

auth0-extensions/auth0-extension-s3-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auth0 Extension Tools for Amazon S3

A set of tools and utilities to simplify the development of Auth0 Extensions with Amazon S3. This can be used in combination with a BlobRecordProvider.

Usage

const tools = require('auth0-extension-s3-tools');

Read from S3.

Read a file from Amazon S3:

const ctx = new tools.S3StorageContext({
  path: '/foo.json',
  bucket: 'myBucket',
  keyId: 'myKey',
  keySecret: 'mySecret',
  defaultData: { foo: 'bar' }
});
ctx.read()
  .then(function(data) {
    // Use data
  });

Write to S3.

Write a file to Amazon S3:

const ctx = new tools.S3StorageContext({
  path: '/foo.json',
  bucket: 'myBucket',
  keyId: 'myKey',
  keySecret: 'mySecret',
  defaultData: { foo: 'bar' }
});
ctx.write({ foo: 'other-bar' })
  .then(function() {
    // Success
  });

About

A set of tools and utilities to simplify the development of Auth0 Extensions with Amazon S3.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •