SpoonX / aurelia-authentication

Authentication plugin for aurelia.
http://aurelia-authentication.spoonx.org
MIT License
90 stars 60 forks source link

Extend error with Typescript #369

Closed jmdavid closed 3 years ago

jmdavid commented 6 years ago

I followed the instructions but as soon as I add this: .plugin('aurelia-authentication', baseConfig => { baseConfig.configure(authConfig); }); I get "TypeError: extend_1.default is not a function".

Thanks for help.

jmdavid commented 6 years ago

I forgot to mention: here is my authConfig.ts:

` import extend from 'extend';

var baseConfig = { endpoint: 'auth', configureEndpoints: ['auth', 'api'], loginRedirect: '/', logoutRedirect: '/', profileUrl: '/auth/me', withCredentials: true };

var configForDevelopment = { providers: { } };

var configForProduction = { providers: { } };

var config;

if (window.location.hostname === 'localhost') { config = extend(true, {}, baseConfig, configForDevelopment); } else { config = extend(true, {}, baseConfig, configForProduction); }

export default config; `

doktordirk commented 6 years ago

sounds like aurelia-cli and adding all dependencies. see [https://aurelia-authentication.spoonx.org/installation.html]