neroniaky / angular-token

:key: Token based authentication service for Angular with interceptor and multi-user support. Works best with devise token auth for Rails. Example:
https://stackblitz.com/github/neroniaky/angular-token
MIT License
370 stars 188 forks source link

Any plans of supporting ionic 3? #340

Open NuclearMachine opened 7 years ago

NuclearMachine commented 7 years ago

doesnt seem to work even with the router module.

My system:

cli packages: (/usr/lib/node_modules)

    @ionic/cli-utils  : 1.10.2
    ionic (Ionic CLI) : 3.10.3

global packages:

    Cordova CLI : 7.0.1 

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.6.0

System:

    Node : v8.5.0
    npm  : 5.4.2 
    OS   : Linux 4.10

there are no errors when doing an ionic serve but there is with ionic build.

Error: 'Angular2TokenService' is not exported by node_modules/angular2-token/angular2-token.js
    at error (/home/nuclearmachine/Desktop/Projects/Projects Files/project-test/test-ionic/node_modules/rollup/dist/rollup.js:170:12)
    at Module.error$1 [as error] (/home/nuclearmachine/Desktop/Projects/Projects Files/project-test/test-ionic/node_modules/rollup/dist/rollup.js:7998:2)
    at Module.trace (/home/nuclearmachine/Desktop/Projects/Projects Files/project-test/test-ionic/node_modules/rollup/dist/rollup.js:8097:9)
    at ModuleScope.findDeclaration (/home/nuclearmachine/Desktop/Projects/Projects Files/project-test/test-ionic/node_modules/rollup/dist/rollup.js:7682:22)
    at Node.bind (/home/nuclearmachine/Desktop/Projects/Projects Files/project-test/test-ionic/node_modules/rollup/dist/rollup.js:6734:29)
    at /home/nuclearmachine/Desktop/Projects/Projects Files/project-test/test-ionic/node_modules/rollup/dist/rollup.js:5279:50
    at Node.eachChild (/home/nuclearmachine/Desktop/Projects/Projects Files/project-test/test-ionic/node_modules/rollup/dist/rollup.js:5293:19)
    at Node.bind (/home/nuclearmachine/Desktop/Projects/Projects Files/project-test/test-ionic/node_modules/rollup/dist/rollup.js:5279:7)
    at /home/nuclearmachine/Desktop/Projects/Projects Files/project-test/test-ionic/node_modules/rollup/dist/rollup.js:5279:50
    at Node.eachChild (/home/nuclearmachine/Desktop/Projects/Projects Files/project-test/test-ionic/node_modules/rollup/dist/rollup.js:5296:5)
fabn commented 7 years ago

Why did you close this? Have you found a working solution?

NuclearMachine commented 7 years ago

Nope didn't found a solution. I am currently experimenting with jwt-devise instead

chadnaylor commented 7 years ago

Finally got a solution working for this after a decent amount of struggling. I ended up forking angular2-token and adding some logic to handle Ionic inAppBrowser OAuth flows.

If anyone's still interested I can clean up the code and put it up or submit a pull req or something.

neroniaky commented 7 years ago

@chadnaylor would be really nice if you could make it a PR! 😄

chadnaylor commented 7 years ago

Okay! This week looks a bit crazy for me, but I will try to get to it this weekend.

chadnaylor commented 7 years ago

@neroniaky pull req'd!

penguinwokrs commented 6 years ago

I want to avoid ion dependence of angular2-token. 😢

https://github.com/neroniaky/angular2-token/pull/364/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R69

hrangel commented 5 years ago

Just made a PR with that: https://github.com/neroniaky/angular-token/pull/488