1
私は現在、Angular2アプリでAuth0を設定しようとしています。私はangular2-cliを使用しています。 authという新しいサービスを追加しました。私はnpm start
を実行すると、私はここでエラーsrc/app/auth.service.ts (21,5): Supplied parameters do not match any signature of call target.
Auth0 with Angular2 "指定されたパラメータがコールターゲットのシグネチャと一致しません。
を取得し、私のauth.service.tsここ
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import 'rxjs/add/operator/filter';
import * as auth0 from 'auth0-js';
@Injectable()
export class AuthService {
auth0 = new auth0.WebAuth({
clientID: 'removed for privacy',
domain: 'removed for privacy',
responseType: 'token id_token',
audience: 'removed for privacy',
redirectUri: 'http://localhost:4200/callback',
scope: 'openid'
});
constructor(public router: Router) {}
public login(): void {
this.auth0.authorize();
}
}
である私はAuth0 Angular2を、次の午前私のpackage.json
"dependencies": {
"@angular/cli": "^1.0.0-rc.0",
"@angular/common": "^2.4.0",
"@angular/compiler": "^2.4.0",
"@angular/core": "^2.4.8",
"@angular/forms": "^2.4.0",
"@angular/http": "^2.4.0",
"@angular/platform-browser": "^2.4.0",
"@angular/platform-browser-dynamic": "^2.4.0",
"@angular/router": "^3.4.0",
"@angular2-material/button": "^2.0.0-alpha.5",
"@angular2-material/card": "^2.0.0-alpha.5",
"@angular2-material/checkbox": "^2.0.0-alpha.5",
"@angular2-material/core": "^2.0.0-alpha.5",
"@angular2-material/icon": "^2.0.0-alpha.5",
"@angular2-material/input": "^2.0.0-alpha.5",
"@angular2-material/list": "^2.0.0-alpha.5",
"@angular2-material/toolbar": "^2.0.0-alpha.5",
"core-js": "^2.4.1",
"hammerjs": "^2.0.8",
"pg": "^6.2.3",
"pg-hstore": "^2.3.2",
"rxjs": "^5.1.0",
"sequelize": "^3.30.4",
"sequelize-cli": "^2.7.0",
"zone.js": "^0.7.6"
},
"devDependencies": {
"@angular/cli": "1.0.0-rc.0",
"@angular/compiler-cli": "^2.4.0",
"@types/hammerjs": "^2.0.34",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"gh-pages": "^0.12.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.4.2",
"typescript": "~2.0.0",
"video.js": "^5.19.2"
}
からの私の依存関係していますAuth0ウェブサイトの+ SDKクイックスタートで運がない。どんな助けもありがとう。