oauthjs/angular-oauth2

Problem on module inject

auriga1 opened this issue · 8 comments

I'm building a project with ionic framework.
When I inject 'angular-oauth2' on my root module I have this error:

Uncaught Error: [$injector:unpr] Unknown provider: $$cookieReaderProvider <- $$cookieReader <- $cookies <- OAuthToken <- oauthInterceptor <- $http <- $templateFactory <- $view <- $state <- $cookies

I tried with module angular-cookies from angular and with angular-cookie from ivpusic

Hey @auriga1. Which angular version are you using in your project? angular-oauth2 requires angular >=1.4 because it uses the new ngCookies. Do you have the latest ngCookies in your project dependencies?

Thank you very much :)
I have angular@1.3.13

What can I do? I downloaded angular-cookies starting from the link on the homepage of this project!

You should download the latest angular release (1.4.3) and the angular cookies module as well (1.4.3). This should solvethe issue :)

Yes you are right,
the fact is that actually I'm using Ionic Framework and its last release include Angular 1.3.
Reading on the web it seems that there is not an easy way to upgrade to 1.4 without the risk to loose stability.

I hope next subversion will include angular@1.4

Thank you very much for reply

You can use 2.2.1.

@ruipenso: thanks for reply. I can't find version 2.2.1 dependecies. Does it works with Angular 1.3.13?

Yes.

https://github.com/seegno/angular-oauth2/blob/2.1.1/bower.json

"dependencies": {
  "angular": "^1.3.9",
  "angular-cookie": "^4.0.6",
  "query-string": "^1.0.0"
}

thx