Skip to content

Commit

Permalink
Fix Auth0Client export and integration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxswa committed Dec 18, 2019
1 parent eceac8f commit 29441d1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
12 changes: 8 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ let bundles = [
output: {
name: EXPORT_NAME,
file: 'dist/auth0-spa-js.development.js',
format: 'umd'
format: 'umd',
exports: 'named'
},
plugins: [
...getPlugins(false),
Expand All @@ -67,7 +68,8 @@ if (isProduction) {
{
name: EXPORT_NAME,
file: pkg.browser,
format: 'umd'
format: 'umd',
exports: 'named'
}
],
plugins: [
Expand All @@ -80,7 +82,8 @@ if (isProduction) {
output: [
{
file: pkg.module,
format: 'esm'
format: 'esm',
exports: 'named'
}
],
plugins: getPlugins(isProduction)
Expand All @@ -91,7 +94,8 @@ if (isProduction) {
{
name: EXPORT_NAME,
file: pkg.main,
format: 'cjs'
format: 'cjs',
exports: 'named'
}
],
plugins: getPlugins(false),
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Auth0ClientOptions } from './global';

import { validateCrypto } from './utils';

export * from './Auth0Client';
export { Auth0Client };
export * from './global';

export default async function createAuth0Client(options: Auth0ClientOptions) {
Expand Down
9 changes: 5 additions & 4 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
<button id="logout-no-clientid">logout (no client id)</button>
<script type="text/javascript">
$(function() {
createAuth0Client({
domain: 'auth.brucke.club',
client_id: 'wLSIP47wM39wKdDmOj6Zb5eSEw3JVhVp'
})
createAuth0Client
.default({
domain: 'auth.brucke.club',
client_id: 'wLSIP47wM39wKdDmOj6Zb5eSEw3JVhVp'
})
.then(function(auth0) {
window.auth0 = auth0;
$('#login_popup').click(function() {
Expand Down

0 comments on commit 29441d1

Please sign in to comment.