GithubHelp home page GithubHelp logo

angular2-adal-example's People

Contributors

alenny avatar

Stargazers

 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

angular2-adal-example's Issues

TypeScript error "Cannot resolve module 'adal'".

I'm using TypeScript version 1.8.10 and trying to compile the example project, but I get the following error

Module not found: Error: Cannot resolve module 'adal' in C:\Projects\AzureAD\WebAppsCh5\WebAppsCh5Angular2\node_modules\angular2-adal\services @ ./~/angular2-adal/services/adal.service.js 20:14-29

I added the "adal" reference to the typings.json file suggested in another issue:

"adal": "github:DefinitelyTyped/DefinitelyTyped/adal-angular/adal.d.ts#53347571e6f44ed9a961b569bb81893fde4789c1",

Unfortunately, that didn't fix the error either. Do I need to npm install the ADAL.js package?

npm run build failed

Got above error running sample gulp file, here is the npm log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files (x86)\nodejs\node.exe',
1 verbose cli 'C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files (x86)\nodejs\node.exe
5 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
6 info prebuild [email protected]
7 info build [email protected]
8 verbose unsafe-perm in lifecycle true
9 info [email protected] Failed to exec build script
10 verbose stack Error: [email protected] build: tsc
10 verbose stack Exit status 2
10 verbose stack at EventEmitter. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
10 verbose stack at EventEmitter.emit (events.js:110:17)
10 verbose stack at ChildProcess. (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:14:12)
10 verbose stack at ChildProcess.emit (events.js:110:17)
10 verbose stack at maybeClose (child_process.js:1015:16)
10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid [email protected]
12 verbose cwd C:\Users\IsaacLevin\Downloads\angular2-adal-example-master
13 error Windows_NT 6.3.9600
14 error argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
15 error node v0.12.2
16 error npm v2.7.4
17 error code ELIFECYCLE
18 error [email protected] build: tsc
18 error Exit status 2
19 error Failed at the [email protected] build script 'tsc'.
19 error This is most likely a problem with the angular2-azure-ad package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error tsc
19 error You can get their info via:
19 error npm owner ls angular2-azure-ad
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]

Prod build fails with webpack + ng4

Hi,

I am trying to integrate this package with a brand new Angular 2 app (using "@angular/core": "^4.1.2" in package.json). I'm using webpack to do the build instead of SystemJs.

Local dev build with ng build and ng serve is working fine but prod build with ng build --prod --aot fails with the following error.

ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol Injectable in c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/core/src/di.d.ts, resolving symbol Injectable in c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/core/src/core.d.ts, resolving symbol Injectable in c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/core/index.d.ts, resolving symbol BrowserXhr in
c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/http/src/backends/browser_xhr.d.ts, resolving symbol BrowserXhr in c:/path-to-my-project/node_modules/ng2-adal/node_modules/@angular/http/src/backends/browser_xhr.d.ts

Is this because the package is built using older Angular version? Is there a way I can get around it or fix it?

core_1.provide is not a function

Integrating into Ionic2 app

Not really an issue, this example works

Is there to integrate this into an Ionic2 app. The issue I'm having is that the token from the browser does not get sent through to the app.

Example for acquireToken?

Is this the correct usage of this function? I seem to be getting an error " Build: Property 'subscribe' does not exist on type '() => Observable<{}>'"

this.adalService.acquireToken("http://whatever")
.subscribe(
data => {
alert(data);
},
error => {
alert('error!');
}
);

GET /lib/adal-angular/lib/adal.js 404 (Not Found)

I'm unable to run the sample.

GET /lib/adal-angular/lib/adal.js 404 (Not Found)

I changed the map path in systemjs.config.js to get around the issue:

Was:
'adal': 'lib/adal-angular/lib'

Edited:
'adal': 'lib/angular2-adal/node_modules/adal-angular/lib'

TS2503: Cannot find namespace 'adal'

The example doesn't appear to work.

node_modules/angular2-adal/services/adal.service.d.ts(13,25): error TS2503: Cannot find namespace 'adal'.

Edit:
I fixed it by adding "adal": "github:DefinitelyTyped/DefinitelyTyped/adal-angular/adal.d.ts#53347571e6f44ed9a961b569bb81893fde4789c1" to typings.json

The app is struck at loading message..

I did the following command to fix the build error:

typings install --save --global --source dt adal-angular/adal

But on running the app, I see the Loading message never goes away.. On the SystemJS output, I see adal.js not found with 404 error.

validate token in java

Hi,

I need to validate the token in a rest service in java that's consumed by a logged in user, do you know how can I validate it?

thanks.

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.