Code Monkey home page Code Monkey logo

auth0-angularjs-sample's People

Contributors

annyv2 avatar chenkie avatar christiannwamba avatar glena avatar sildur avatar vmartynets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auth0-angularjs-sample's Issues

Auth0 is not defined

When implementing this I am getting the following error:

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module auth0.auth0 due to:
ReferenceError: Auth0 is not defined

Any ideas what might be causing that?

RequireJs example with auth0

Hey, I am using auth0 for my angularJs application.
Actually I am getting this error

This is my config.js
**require.config({

waitSeconds: 60,

paths: {
    angular: '../bower_components/angular/angular',
    'angular-ui-router': '../bower_components/angular-ui-router/release/angular-ui-router',
    jquery: '../bower_components/jquery/dist/jquery.min',
    jqueryui: '../bower_components/jquery-ui/jquery-ui.min',
    bootstrap: '../bower_components/bootstrap/dist/js/bootstrap.min',
    underscore: '../bower_components/underscore/underscore-min',
    'angular-ui-utils': '../bower_components/angular-ui-utils/ui-utils.min',
    'moment': '../bower_components/moment/moment',
    'cookies': '../bower_components/cookies-js/dist/cookies',
    'angular-bootstrap': '../bower_components/angular-bootstrap/ui-bootstrap-tpls',
    'toastr': '../bower_components/angular-toastr/dist/angular-toastr.tpls',
    'angularTreeview': '../libs/angular.treeview/angular.treeview',
    'angular-confirm-modal': '../bower_components/angular-confirm-modal/angular-confirm.min',
    'rangy-core': '../bower_components/rangy/rangy-core.min',
    'rangy-selectionsave': '../bower_components/rangy/rangy-selectionsaverestore.min',
    'textAngular-sanitize': '../libs/textAngular/textAngular-sanitize.min',
    'textAngularSetup': '../libs/textAngular/textAngularSetup',
    'textAngular': '../libs/textAngular/textAngular',
    'anguFixedHeaderTable': '../bower_components/angu-fixed-header-table/angu-fixed-header-table',
    'io.dennis.contextmenu': '../bower_components/angular-contextmenu/dist/contextmenu',
    'bootstrap-tokenfield': '../bower_components/bootstrap-tokenfield/dist/bootstrap-tokenfield.min',
    'auth0': "../bower_components/auth0.js/build/auth0",
    'auth0.auth0': "../bower_components/angular-auth0/dist/angular-auth0"
},

shim: {
    jquery: {
        exports: 'jquery'
    },
    jqueryui: {
        deps: ['jquery']
    },
    bootstrap: {
        deps: ['jquery']
    },
    angular: {
        exports: 'angular',
        deps: ['jquery']
    },
    'angular-ui-router': {
        deps: ['angular']
    },
    'angular-ui-utils': {
        deps: ['angular']
    },
    'angular-bootstrap': {
        deps: ['angular']
    },
    'toastr': {
        deps: ['angular']
    },
    'angularTreeview': {
        deps: ['angular']
    },
    'angular-confirm-modal': {
        deps: ['angular', 'angular-bootstrap']
    },
    'textAngularRangySetup': {
        exports: 'rangy'
    },
    'rangy-selectionsave': {
        deps: ['rangy-core']
    },
    'textAngular-sanitize': {
        deps: ['angular']
    },
    'textAngularSetup': {
        deps: ['angular']
    },
    'textAngular': {
        exports: 'textAngular',
        deps: ['angular', 'textAngular-sanitize', 'textAngularSetup']
    },
    'anguFixedHeaderTable': {
        deps: ['angular']
    },
    'io.dennis.contextmenu': {
        deps: ['angular']
    },
    'bootstrap-tokenfield': {
        deps: ['jquery']
    },
    'auth0': {
        exports: "auth0"
    },
    'auth0.auth0': {
        "deps": ["angular", "auth0"]
    },
}

});

require(['rangy-core', 'rangy-selectionsave'], function (rangyCore) {
window.rangy = rangyCore;
});**

App.js

define([
'angular',
'angular-ui-router',
'auth0',
'auth0.auth0'
], function(angular,
appConfig,
suggestions,
displayMapping,
AppConstants) {
'use strict';

**// define the module and any module dependencies
var appModule = angular.module('app', [
    'ui.router',
    'ui.bootstrap',
    'toastr',
    'angularTreeview',
    'angular-confirm',
    'textAngular',
    'anguFixedHeaderTable',
    'io.dennis.contextmenu'    
    ]);

//configure module
appModule
    .config(appConfig);

return appModule;

});**

My main.js

**[define([
'jquery',
'underscore',
'angular',
'bootstrap',
'jqueryui',
'app/app'
], function($, _, angular) {
'use strict';

try {
    if (!window.jasmine) {
        angular.bootstrap(document, ['app']);
    }
} catch (e) {
    // don't bootstrap more than once.
    if(this.console && this.console.log){
      console.log(e);
    }
}

});](url)**

so, Here I am getting this error.

Uncaught ReferenceError: auth0 is not defined
at Object. (angular-auth0.js:152)
at webpack_require (angular-auth0.js:20)
at Object.module.exports (angular-auth0.js:74)
at webpack_require (angular-auth0.js:20)
at Object.defineProperty.value (angular-auth0.js:63)
at angular-auth0.js:66

So, How to resolve this issue ?

lock.on('authenticated') does not fire - solution

Numerous people using auth0 lock have had this issue where the authenticated event does not fire. See https://auth0.com/forum/t/authenticated-event-not-triggering/3554. It is fixed by adding the following to the options property when calling lockProvider.init() ...
`var options = {
//Must have these two settings for auth0 lock to work properly!
auth: {
redirect: false,
responseType: 'token'
}
};

            lockProvider.init({
                clientID: APP_CONFIG.auth0ClientId,
                domain: APP_CONFIG.auth0Domain,
                options: options
            }); `

Why remove the calling api example?

Why has the "calling API" example been removed?

Would it be possible to replace it with a link to how you suggest we call API's? Is the next step to use the API guide relevant to whichever API backend framework is preferred?

The reason this is not just straightforward as previously is because:

  1. If you have a frontend application using client of type "SPA" you have a specific client ID for that application. Previously, you simply used that client ID on the server to verify the client.
  2. Now that it seems the solution is to create a separate Server API client, you now have to create a separate client of type "Non-interactive" with a different Client ID.
  3. So your server and client has now has different Client IDs, which is a more complex problem to solve than previously.

So now that the example of calling an API has been removed and no documentation has replaced it to solve this more complex problem.

This is relevant to commit a2484f0

Requirejs example

I am trying to use this example with Requirejs but doesn't seem to have any luck... It keeps on throwing

Failed to instantiate module auth0.auth0 due to:
ReferenceError: Auth0 is not defined

Is it possible to get an example using RequireJS, I also tried to use example of angular-lock but that also throws similar error about Auth0Lock is not defined.

Following is my require.config, not sure what I am doing wrong here...

require.config({
    "paths": {
      "jquery": "node_modules/" + "jquery/dist/jquery.min",
      "angular": "node_modules/" + "angular/angular.min",
      "ngRoute": "node_modules/" + "angular-route/angular-route.min",
      "lodash": "node_modules/" + "lodash/lodash",
      "bootstrap": "node_modules/" + "bootstrap/dist/js/bootstrap.min",
      "ui.bootstrap": "node_modules/" + "angular-ui-bootstrap/dist/ui-bootstrap-tpls",
      "auth0": "bower_components/" + "auth0.js/build/auth0",
    "auth0.auth0":"bower_components/" + "angular-auth0/dist/angular-auth0",
    "angular-jwt":"bower_components/" + "angular-jwt/dist/angular-jwt",

      "domReady": "node_modules/" + "requirejs-domReady/domReady",
      "SYS.Controllers": "js/controllers/" + "controllers",
      "SYS.Service.Auth": "js/services/" + "SYS.Service.Auth"
    },
    "shim": {
      "angular": {
        "exports": "angular"
      },
      "ngRoute": {
        "deps": ["angular"]
      },
      "bootstrap": {
        "deps": ["jquery"]
      },
      "ui.bootstrap": {
        "deps": ["angular", "bootstrap"]
      },
      "lodash": {
        "exports": "_"
      },
      "auth0": {
        "exports": "Auth0"
      },
      "auth0.auth0": {
        "deps": ["angular", "auth0"]
      },
      "angular-jwt": {
        "deps": ["angular"]
      }
    }
  });

I would appreciate any help regarding fixing this.

cheers
Ashish

Unable to initialize the app using lockProvider

angular.js:68 Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
TypeError: lockProvider.init is not a function

whille trying to incorporate this into my project.

Getting the above exception.
Using angular version : 1.5.8

The profile attributes not getting passed

It seems that the profile attributes (name, email, roles etc) are not being passed in the jwt when making the server call. So the spring backend cannot resolve these and return UNKNOWN_USER.
Is there any other config to be done to make this happen?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.