amkirwan / ember-token-auth Goto Github PK
View Code? Open in Web Editor NEWEmber-CLI addon for using Ember-OAuth2 in your app
License: MIT License
Ember-CLI addon for using Ember-OAuth2 in your app
License: MIT License
Reading through the documentation and being quite new to oAuth in general, I think its very confusing if these two addons are actually the same thing.
The documentation telling you to refer to the other addon continuously isn't great...
Attempting to install ember-oauth2 resulted in a error, so I chose ember-token-auth.
Are they the same? If not, what is the difference and which one should you use when developing using Ember CLI.
Thanks in advance
$ ember build
version: 0.0.40
Build failed.
Merge error: file "ember-oauth2/.bower.json" exists in vendor and vendor-addon - pass option { overwrite: true } to mergeTrees in order to have the latter file win
I was confused the redirectUri.
At first I've registered the redirectUri in google develop console, then added it in my app, like this:
redirectUri: http://localhost:4200/oauth/callback
.
But After I chose a account to click 'Accept' in alert dialog, it just stay on /oauth/callback
blank page, never sent confirm to google.
In alert dialog console, there is a error, says:"The URL '/oauth/callback' did not match any routes in your application". Need I add a route for /oauth/callback
in router.js
?
Build failed.
Line 43: Unexpected token )
File: ember-token-auth/initializers/session.js
Error: Line 43: Unexpected token )
Hi, I was able to install it, but the generate command failed.
≻ ember --version
ember-cli: 2.10.0
node: 6.9.2
os: darwin x64
≻ npm install --save-dev ember-token-auth
[email protected] /Users/xxxx/Projects/ember-home_pager_api
└── [email protected]
≻ ember generate ember-token-auth
Unexpected identifier
/Users/xxxx/Projects/ember-home_pager_api/node_modules/ember-token-auth/blueprints/ember-token-auth/index.js:8
afterUninstall: function() {
^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Function.Blueprint.load (/Users/xxxx/Projects/ember-home_pager_api/node_modules/ember-cli/lib/models/blueprint.js:1278:29)
at Function.Blueprint.lookup (/Users/xxxx/Projects/ember-home_pager_api/node_modules/ember-cli/lib/models/blueprint.js:1255:24)
session.authorize() seems only returning Window
, thus in the callback session.get('auth').trigger('redirect', response) is throwing errors.
Following is where I import your routes/login.js:
//in my app: app/routes/login.js
import Ember from 'ember';
import Login from 'ember-token-auth/routes/login';
export default Login;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.