auth0 / angular-auth0

Angular 1.x Wrapper for Auth0.js v9 and higher
MIT License
24 stars 22 forks source link

Auth0 is not defined #31

Closed frolicky closed 4 years ago

frolicky commented 6 years ago

I am receiving the following error:

Uncaught ReferenceError: auth0 is not defined --------> module.exports = auth0 at Object. (angular-auth0.min.js:1) at b (angular-auth0.min.js:1) at Object. (angular-auth0.min.js:1) at b (angular-auth0.min.js:1) at angular-auth0.min.js:1 at Object. (angular-auth0.min.js:1) at webpack_require (bootstrap eed81c4624dfc06acf6f:19) at Object. (config.js:9) at webpack_require (bootstrap eed81c4624dfc06acf6f:19) at Object. (module.js:4)

Following is my config.js:

define([ 'effective-features!', 'angularRouter', '../../../node_modules/auth0-js/', '../../../node_modules/auth0-js/build/auth0.min', '../../../node_modules/angular-auth0/dist/angular-auth0.min', ], (appFeatures)=> { return angular.module('portal.config', ['auth0.auth0', 'ui.router'])

    .constant('httpSettings', {
        reloadQueryParamName: 'goto',
        reloadURL: '/index.html',
        auth: {
            kind: 'basic',
            username: 'upstream',
            password: 'password'
        }
    })

   .config(['$stateProvider', '$urlRouterProvider', ($stateProvider, $urlRouterProvider)=> {
        $stateProvider.state(
            {
                name: 'root',
                url: '',
                template: '<div ui-view></div>',
                abstract: true,
                data: {
                    defaultState: homeState
                }
            }
        );
        $urlRouterProvider.when('', homeUrl);
        $urlRouterProvider.otherwise($injector => {
            const $state = $injector.get('$state');
            $state.go(homeState);
        });
    }])
    .config(['angularAuth0Provider', (angularAuth0Provider) => {
            // Initialization for the angular-auth0 library
            angularAuth0Provider.init({
                clientID: 'WHuyyzJ7Mk8lcSI7M3vn0w97JNUKBhvd',
                domain: 'afc.auth0.com',
                responseType: 'token id_token',
                audience: 'https://afca.auth0.com/userinfo',
                redirectUri: 'http://localhost:3000/callback',
                scope: 'openid'
            });
        }])

});

joshcanhelp commented 4 years ago

This issue has been closed as stale because it has not had recent activity. If you have not received a response for our team (apologies for the delay), please reply with any additional information or a ping. Thank you for your contribution!