Giter VIP home page Giter VIP logo

angular2-devise-token-auth's People

Contributors

ddomingues avatar jackwcollins avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

angular2-devise-token-auth's Issues

Error with AUTH_PROVIDERS (Angular2+Ionic2)

Hi!

Tried to use this with Ionic2/Angular2 project. When running app in browser getting the next error:
reflective_provider.js:163
Uncaught Invalid provider - only instances of Provider and Type are allowed, got: [object Object]

Here is my app.ts file:

import { Component, ViewChild } from '@angular/core';
import { AUTH_PROVIDERS, authService } from 'angular2-devise-token-auth';
import { HTTP_PROVIDERS } from '@angular/http';
import { App, ionicBootstrap, Platform, Nav } from 'ionic-angular';
import { StatusBar } from 'ionic-native';

...

@Component({
  templateUrl: 'build/app.html'
})
class MyApp {
  @ViewChild(Nav) nav: Nav;

  ...
  constructor(private platform: Platform) {
    this.initializeApp();
    ...
  }

  initializeApp() {
    ...
  }
}

ionicBootstrap(MyApp, [HTTP_PROVIDERS, AUTH_PROVIDERS]);

Here is a part of reflective_provider.js file that falls with error:

exports.mergeResolvedReflectiveProviders = mergeResolvedReflectiveProviders;
function _normalizeProviders(providers, res) {
    providers.forEach(function (b) {
        if (b instanceof lang_1.Type) {
            res.push(provider_1.provide(b, { useClass: b }));
        }
        else if (b instanceof provider_1.Provider) {
            res.push(b);
        }
        else if (provider_util_1.isProviderLiteral(b)) {
            res.push(provider_util_1.createProvider(b));
        }
        else if (b instanceof Array) {
            _normalizeProviders(b, res);
        }
        else if (b instanceof provider_1.ProviderBuilder) {
            throw new reflective_exceptions_1.InvalidProviderError(b.token);
        }
        else {
>>>         throw new reflective_exceptions_1.InvalidProviderError(b); // LINE 163
        }
    });
    return res;
}

Any ideas?

It is broken when installing

Hey there. It is broken while installing, just take a look:

npm ERR! Tell the author that this fails on your system:
npm ERR!     typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs angular2-devise-token-auth

How does it work?

Hey, im wondering how it works. I can sign in and get a 200 back, so it was successfull. But after that when i do a authHttp.get(url) on a url with authenticated_user! the authentication is restricted. Can you explain how it works?

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.