Giter Club home page Giter Club logo

ember-cli-rails-oauth-example's Introduction

Ember CLI && Rails && OAuth

This example app allows users authenticate using their GitHub account. Their GitHub information is used to create an account on the Rails server along with an access token.

This app makes use of:

Demo

There's a demo of this app running at https://ember-cli-rails-auth.firebaseapp.com/.

How it Works

  1. Torii is used to fetch a temporary authorization code from GitHub as described in GitHub's Web Application Flow docs.
  2. Ember Simple Auth uses the temporary authorization code to authenticate the session with the Rails server.
  3. The Rails server uses the temporary authorization code to fetch the associated accounts details, find or create a matching user, and then find or create an access token for that user.
  4. The Rails server sends the matching user's access token back to Ember Simple Auth on the client side along with the current user's id.
  5. Ember Simple Auth stores the access token and current user's id in local storage.
  6. Ember Simple Auth fetches the current user's record from the server and adds it to the store.
  7. Ember Simple Auth uses the stored access token to authorize further requests that are sent to the server.

Installation

  1. Clone this repo.
  2. Edit the api keys in frontend/config/environment.js (you'll need to register your application with GitHub).
  3. Copy backend/.env.sample to backend/.env and add your GitHub credentials.
  4. Start both apps with rake run.

Contributing

Please do!

ember-cli-rails-oauth-example's People

Contributors

heroiceric avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ember-cli-rails-oauth-example's Issues

Can't install broccoli-sass

ember-cli-rails-oauth-example/frontend$ ember s
version: 0.0.39
Cannot find module '/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/broccoli-sass'Error: Cannot find module '/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/broccoli-sass'
at Function.Module._resolveFilename (module.js:331:15)
at Function.Module._load (module.js:273:25)
at Module.require (module.js:357:17)
at require (module.js:373:17)
at requireLocal (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/utilities/require-local.js:6:10)
at StylePlugin.toTree (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/preprocessors/style-plugin.js:21:10)
at module.exports.preprocessCss (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/preprocessors.js:75:24)
at EmberApp. (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/broccoli/ember-app.js:393:25)
at EmberApp.memoized as styles
at EmberApp.toArray (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/broccoli/ember-app.js:555:10)
at EmberApp.toTree (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/broccoli/ember-app.js:567:30)
at Object. (/home/bigstores/ember-cli-rails-oauth-example/frontend/Brocfile.js:28:22)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Module.require (module.js:357:17)
at require (module.js:373:17)
at Object.loadBrocfile (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/node_modules/broccoli/lib/builder.js:147:14)
at Class.module.exports.Task.extend.setupBroccoliBuilder (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/models/builder.js:18:29)
at Class.module.exports.Task.extend.init (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/models/builder.js:35:10)
at new Class (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/models/core-object.js:18:12)
at Class.module.exports.Task.extend.run (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/tasks/serve.js:12:19)
at Class.module.exports.Command.extend.run (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/commands/serve.js:35:18)
at Class.Command.validateAndRun (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/models/command.js:71:15)
at /home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/lib/cli/cli.js:45:22
at $$$internal$$tryCatch (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:470:16)
at $$$internal$$invokeCallback (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:482:17)
at /home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1066:13
at $$rsvp$asap$$flush (/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1531:9)
at process._tickCallback (node.js:664:11)
bigstores@bigstores:~/ember-cli-rails-oauth-example/frontend$ npm install
npm http GET https://registry.npmjs.org/broccoli-sass
npm http 304 https://registry.npmjs.org/broccoli-sass
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/promise-map-series
npm http GET https://registry.npmjs.org/include-path-searcher
npm http GET https://registry.npmjs.org/broccoli-writer
npm http GET https://registry.npmjs.org/rsvp
npm http GET https://registry.npmjs.org/node-sass
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/promise-map-series
npm http 304 https://registry.npmjs.org/rsvp
npm http 304 https://registry.npmjs.org/node-sass
npm http 304 https://registry.npmjs.org/include-path-searcher
npm http 304 https://registry.npmjs.org/broccoli-writer
npm http GET https://registry.npmjs.org/quick-temp
npm http GET https://registry.npmjs.org/chalk
npm http GET https://registry.npmjs.org/mocha
npm http GET https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/node-watch
npm http GET https://registry.npmjs.org/object-assign
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/shelljs
npm http GET https://registry.npmjs.org/sinon
npm http GET https://registry.npmjs.org/node-sass-middleware
npm http 304 https://registry.npmjs.org/quick-temp
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/mktemp
npm http GET https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/mocha
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/object-assign
npm http 304 https://registry.npmjs.org/shelljs
npm http 304 https://registry.npmjs.org/chalk
npm http 304 https://registry.npmjs.org/sinon
npm http 304 https://registry.npmjs.org/node-sass-middleware
npm http 304 https://registry.npmjs.org/node-watch
npm http 304 https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/has-color
npm http GET https://registry.npmjs.org/ansi-styles
npm http GET https://registry.npmjs.org/strip-ansi
npm http 304 https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/mktemp
npm http GET https://registry.npmjs.org/minimist
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/minimist/0.0.8
npm http GET https://registry.npmjs.org/commander/2.0.0
npm http GET https://registry.npmjs.org/growl
npm http GET https://registry.npmjs.org/jade/0.26.3
npm http GET https://registry.npmjs.org/diff/1.0.7
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/glob/3.2.3
npm http GET https://registry.npmjs.org/formatio
npm http GET https://registry.npmjs.org/util
npm http 304 https://registry.npmjs.org/strip-ansi
npm http 304 https://registry.npmjs.org/has-color
npm http 304 https://registry.npmjs.org/ansi-styles
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/minimist/0.0.8
npm http 304 https://registry.npmjs.org/commander/2.0.0
npm http 304 https://registry.npmjs.org/diff/1.0.7
npm http 304 https://registry.npmjs.org/growl
npm http 304 https://registry.npmjs.org/jade/0.26.3
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/glob/3.2.3
npm http GET https://registry.npmjs.org/ms/0.6.2
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/util
npm http 304 https://registry.npmjs.org/formatio
npm http GET https://registry.npmjs.org/samsam
npm http GET https://registry.npmjs.org/inherits/2.0.1
npm http 304 https://registry.npmjs.org/ms/0.6.2
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/commander/0.6.1
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/samsam
npm http 304 https://registry.npmjs.org/inherits/2.0.1
npm http 304 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/lru-cache

[email protected] install /home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/broccoli-sass/node_modules/node-sass
node build.js

make: Entering directory /home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/broccoli-sass/node_modules/node-sass/build' CXX(target) Release/obj.target/binding/binding.o In file included from ../binding.cpp:1:0: ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Signature> NanNew(v8::Handle<v8::FunctionTemplate>, int, v8::Handle<v8::FunctionTemplate>*)’: ../node_modules/nan/nan.h:337:64: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*&, v8::Handle<v8::FunctionTemplate>&, int&, v8::Handle<v8::FunctionTemplate>*&)’ ../node_modules/nan/nan.h:337:64: note: candidate is: /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:3585:27: note: static v8::Local<v8::Signature> v8::Signature::New(v8::Handle<v8::FunctionTemplate>, int, v8::Handle<v8::FunctionTemplate>*) /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:3585:27: note: candidate expects 3 arguments, 4 provided ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew() [with T = v8::Array]’: ../node_modules/nan/nan.h:365:38: error: invalid conversion from ‘v8::Isolate*’ to ‘int’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2335:23: error: initializing argument 1 of ‘static v8::Local<v8::Array> v8::Array::New(int)’ [-fpermissive] ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P) [with T = v8::Array, P = int]’: ../node_modules/nan/nan.h:370:46: error: no matching function for call to ‘v8::Array::New(v8::Isolate*&, int&)’ ../node_modules/nan/nan.h:370:46: note: candidate is: /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2335:23: note: static v8::Local<v8::Array> v8::Array::New(int) /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2335:23: note: candidate expects 1 argument, 2 provided ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P) [with T = v8::Date, P = double]’: ../node_modules/nan/nan.h:375:43: error: no matching function for call to ‘v8::Date::New(v8::Isolate*&, double&)’ ../node_modules/nan/nan.h:375:43: note: candidate is: /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2866:23: note: static v8::Local<v8::Value> v8::Date::New(double) /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2866:23: note: candidate expects 1 argument, 2 provided ../node_modules/nan/nan.h:375:56: error: expected primary-expression before ‘>’ token ../node_modules/nan/nan.h:375:58: error: expected primary-expression before ‘)’ token ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P) [with T = v8::Date, P = int]’: ../node_modules/nan/nan.h:380:43: error: no matching function for call to ‘v8::Date::New(v8::Isolate*&, int&)’ ../node_modules/nan/nan.h:380:43: note: candidate is: /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2866:23: note: static v8::Local<v8::Value> v8::Date::New(double) /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2866:23: note: candidate expects 1 argument, 2 provided ../node_modules/nan/nan.h:380:56: error: expected primary-expression before ‘>’ token ../node_modules/nan/nan.h:380:58: error: expected primary-expression before ‘)’ token ../node_modules/nan/nan.h: At global scope: ../node_modules/nan/nan.h:383:11: error: ‘UnboundScript’ in namespace ‘v8’ does not name a type ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P, const v8::ScriptOrigin&)’: ../node_modules/nan/nan.h:391:9: error: ‘v8::ScriptCompiler’ has not been declared ../node_modules/nan/nan.h:391:32: error: expected ‘;’ before ‘source’ ../node_modules/nan/nan.h:392:16: error: ‘v8::ScriptCompiler’ has not been declared ../node_modules/nan/nan.h:392:61: error: ‘source’ was not declared in this scope ../node_modules/nan/nan.h: At global scope: ../node_modules/nan/nan.h:396:24: error: ‘NanUnboundScript’ was not declared in this scope ../node_modules/nan/nan.h:396:40: error: template argument 1 is invalid ../node_modules/nan/nan.h:396:49: error: ‘NanUnboundScript’ was not declared in this scope ../node_modules/nan/nan.h:396:42: error: template-id ‘NanNew<<expression error> >’ for ‘int NanNew(v8::Local<v8::String>)’ does not match any template declaration ../node_modules/nan/nan.h: In function ‘v8::Local<v8::String> NanNew(v8::String::ExternalStringResource*)’: ../node_modules/nan/nan.h:405:57: error: no matching function for call to ‘v8::String::NewExternal(v8::Isolate*&, v8::String::ExternalStringResource*&)’ ../node_modules/nan/nan.h:405:57: note: candidates are: /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1791:24: note: static v8::Local<v8::String> v8::String::NewExternal(v8::String::ExternalStringResource*) /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1791:24: note: candidate expects 1 argument, 2 provided /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1812:24: note: static v8::Local<v8::String> v8::String::NewExternal(v8::String::ExternalAsciiStringResource*) /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1812:24: note: candidate expects 1 argument, 2 provided ../node_modules/nan/nan.h: In function ‘v8::Local<v8::String> NanNew(v8::String::ExternalAsciiStringResource*)’: ../node_modules/nan/nan.h:410:57: error: no matching function for call to ‘v8::String::NewExternal(v8::Isolate*&, v8::String::ExternalAsciiStringResource*&)’ ../node_modules/nan/nan.h:410:57: note: candidates are: /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1791:24: note: static v8::Local<v8::String> v8::String::NewExternal(v8::String::ExternalStringResource*) /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1791:24: note: candidate expects 1 argument, 2 provided /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1812:24: note: static v8::Local<v8::String> v8::String::NewExternal(v8::String::ExternalAsciiStringResource*) /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1812:24: note: candidate expects 1 argument, 2 provided ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P) [with T = v8::NumberObject, P = double]’: ../node_modules/nan/nan.h:434:50: error: no matching function for call to ‘v8::NumberObject::New(v8::Isolate*&, double&)’ ../node_modules/nan/nan.h:434:50: note: candidate is: /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2904:23: note: static v8::Local<v8::Value> v8::NumberObject::New(double) /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2904:23: note: candidate expects 1 argument, 2 provided ../node_modules/nan/nan.h:434:71: error: expected primary-expression before ‘>’ token ../node_modules/nan/nan.h:434:73: error: expected primary-expression before ‘)’ token ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P) [with T = v8::Uint32, P = int]’: ../node_modules/nan/nan.h:463:56: error: invalid conversion from ‘v8::Isolate*’ to ‘uint32_t {aka unsigned int}’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1965:25: error: initializing argument 1 of ‘static v8::Local<v8::Integer> v8::Integer::NewFromUnsigned(uint32_t, v8::Isolate*)’ [-fpermissive] ../node_modules/nan/nan.h:463:56: error: invalid conversion from ‘int32_t {aka int}’ to ‘v8::Isolate*’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1965:25: error: initializing argument 2 of ‘static v8::Local<v8::Integer> v8::Integer::NewFromUnsigned(uint32_t, v8::Isolate*)’ [-fpermissive] ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P) [with T = v8::Uint32, P = unsigned int]’: ../node_modules/nan/nan.h:468:56: error: invalid conversion from ‘v8::Isolate*’ to ‘uint32_t {aka unsigned int}’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1965:25: error: initializing argument 1 of ‘static v8::Local<v8::Integer> v8::Integer::NewFromUnsigned(uint32_t, v8::Isolate*)’ [-fpermissive] ../node_modules/nan/nan.h:468:56: error: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘v8::Isolate*’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1965:25: error: initializing argument 2 of ‘static v8::Local<v8::Integer> v8::Integer::NewFromUnsigned(uint32_t, v8::Isolate*)’ [-fpermissive] ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P) [with T = v8::Int32, P = int]’: ../node_modules/nan/nan.h:473:43: error: invalid conversion from ‘v8::Isolate*’ to ‘int32_t {aka int}’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1964:25: error: initializing argument 1 of ‘static v8::Local<v8::Integer> v8::Integer::New(int32_t, v8::Isolate*)’ [-fpermissive] ../node_modules/nan/nan.h:473:43: error: invalid conversion from ‘int32_t {aka int}’ to ‘v8::Isolate*’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1964:25: error: initializing argument 2 of ‘static v8::Local<v8::Integer> v8::Integer::New(int32_t, v8::Isolate*)’ [-fpermissive] ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P) [with T = v8::Int32, P = unsigned int]’: ../node_modules/nan/nan.h:478:43: error: invalid conversion from ‘v8::Isolate*’ to ‘int32_t {aka int}’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1964:25: error: initializing argument 1 of ‘static v8::Local<v8::Integer> v8::Integer::New(int32_t, v8::Isolate*)’ [-fpermissive] ../node_modules/nan/nan.h:478:43: error: invalid conversion from ‘uint32_t {aka unsigned int}’ to ‘v8::Isolate*’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1964:25: error: initializing argument 2 of ‘static v8::Local<v8::Integer> v8::Integer::New(int32_t, v8::Isolate*)’ [-fpermissive] ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, node::smalloc::FreeCallback, void*)’: ../node_modules/nan/nan.h:770:71: error: no matching function for call to ‘New(v8::Isolate*&, char*&, size_t&, void (*&)(char*, void*), void*&)’ ../node_modules/nan/nan.h:770:71: note: candidates are: /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:46:35: note: v8::Local<v8::Object> node::Buffer::New(size_t) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:46:35: note: candidate expects 1 argument, 5 provided /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:48:35: note: v8::Local<v8::Object> node::Buffer::New(v8::Handle<v8::String>, node::encoding) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:48:35: note: candidate expects 2 arguments, 5 provided /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:52:35: note: v8::Local<v8::Object> node::Buffer::New(const char*, size_t) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:52:35: note: candidate expects 2 arguments, 5 provided /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:54:35: note: v8::Local<v8::Object> node::Buffer::New(char*, size_t, node::smalloc::FreeCallback, void*) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:54:35: note: candidate expects 4 arguments, 5 provided ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’: ../node_modules/nan/nan.h:777:53: error: no matching function for call to ‘New(v8::Isolate*&, const char*&, uint32_t&)’ ../node_modules/nan/nan.h:777:53: note: candidates are: /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:46:35: note: v8::Local<v8::Object> node::Buffer::New(size_t) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:46:35: note: candidate expects 1 argument, 3 provided /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:48:35: note: v8::Local<v8::Object> node::Buffer::New(v8::Handle<v8::String>, node::encoding) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:48:35: note: candidate expects 2 arguments, 3 provided /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:52:35: note: v8::Local<v8::Object> node::Buffer::New(const char*, size_t) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:52:35: note: candidate expects 2 arguments, 3 provided /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:54:35: note: v8::Local<v8::Object> node::Buffer::New(char*, size_t, node::smalloc::FreeCallback, void*) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:54:35: note: candidate expects 4 arguments, 3 provided ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’: ../node_modules/nan/nan.h:781:47: error: no matching function for call to ‘New(v8::Isolate*&, uint32_t&)’ ../node_modules/nan/nan.h:781:47: note: candidates are: /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:46:35: note: v8::Local<v8::Object> node::Buffer::New(size_t) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:46:35: note: candidate expects 1 argument, 2 provided /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:48:35: note: v8::Local<v8::Object> node::Buffer::New(v8::Handle<v8::String>, node::encoding) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:48:35: note: no known conversion for argument 1 from ‘v8::Isolate*’ to ‘v8::Handle<v8::String>’ /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:52:35: note: v8::Local<v8::Object> node::Buffer::New(const char*, size_t) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:52:35: note: no known conversion for argument 1 from ‘v8::Isolate*’ to ‘const char*’ /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:54:35: note: v8::Local<v8::Object> node::Buffer::New(char*, size_t, node::smalloc::FreeCallback, void*) /home/bigstores/.node-gyp/0.11.11/src/node_buffer.h:54:35: note: candidate expects 4 arguments, 2 provided ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’: ../node_modules/nan/nan.h:788:53: error: cannot convert ‘v8::Isolate*’ to ‘char*’ for argument ‘1’ to ‘v8::Local<v8::Object> node::Buffer::Use(char*, uint32_t)’ ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Script> NanCompileScript(v8::Local<v8::String>, const v8::ScriptOrigin&)’: ../node_modules/nan/nan.h:813:9: error: ‘v8::ScriptCompiler’ has not been declared ../node_modules/nan/nan.h:813:32: error: expected ‘;’ before ‘source’ ../node_modules/nan/nan.h:814:16: error: ‘v8::ScriptCompiler’ has not been declared ../node_modules/nan/nan.h:814:54: error: ‘source’ was not declared in this scope ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Script> NanCompileScript(v8::Local<v8::String>)’: ../node_modules/nan/nan.h:820:9: error: ‘v8::ScriptCompiler’ has not been declared ../node_modules/nan/nan.h:820:32: error: expected ‘;’ before ‘source’ ../node_modules/nan/nan.h:821:16: error: ‘v8::ScriptCompiler’ has not been declared ../node_modules/nan/nan.h:821:54: error: ‘source’ was not declared in this scope ../node_modules/nan/nan.h: At global scope: ../node_modules/nan/nan.h:825:17: error: ‘NanUnboundScript’ was not declared in this scope ../node_modules/nan/nan.h:825:33: error: template argument 1 is invalid ../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> NanRunScript(int)’: ../node_modules/nan/nan.h:827:18: error: base operand of ‘->’ is not a pointer ../node_modules/nan/nan.h: In member function ‘void NanCallback::Call(int, v8::Handle<v8::Value>*)’: ../node_modules/nan/nan.h:1476:5: error: no matching function for call to ‘MakeCallback(v8::Isolate*&, v8::Local<v8::Object>, v8::Local<v8::Function>&, int&, v8::Handle<v8::Value>*&)’ ../node_modules/nan/nan.h:1476:5: note: candidates are: /home/bigstores/.node-gyp/0.11.11/src/node.h:88:35: note: v8::Handle<v8::Value> node::MakeCallback(v8::Handle<v8::Object>, const char*, int, v8::Handle<v8::Value>*) /home/bigstores/.node-gyp/0.11.11/src/node.h:88:35: note: candidate expects 4 arguments, 5 provided /home/bigstores/.node-gyp/0.11.11/src/node.h:93:35: note: v8::Handle<v8::Value> node::MakeCallback(v8::Handle<v8::Object>, v8::Handle<v8::String>, int, v8::Handle<v8::Value>*) /home/bigstores/.node-gyp/0.11.11/src/node.h:93:35: note: candidate expects 4 arguments, 5 provided /home/bigstores/.node-gyp/0.11.11/src/node.h:98:35: note: v8::Handle<v8::Value> node::MakeCallback(v8::Handle<v8::Object>, v8::Handle<v8::Function>, int, v8::Handle<v8::Value>*) /home/bigstores/.node-gyp/0.11.11/src/node.h:98:35: note: candidate expects 4 arguments, 5 provided ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P) [with T = v8::Integer, P = int]’: ../node_modules/nan/nan.h:731:64: instantiated from here ../node_modules/nan/nan.h:329:36: error: invalid conversion from ‘v8::Isolate*’ to ‘int32_t {aka int}’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1964:25: error: initializing argument 1 of ‘static v8::Local<v8::Integer> v8::Integer::New(int32_t, v8::Isolate*)’ [-fpermissive] ../node_modules/nan/nan.h:329:36: error: invalid conversion from ‘int’ to ‘v8::Isolate*’ [-fpermissive] /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:1964:25: error: initializing argument 2 of ‘static v8::Local<v8::Integer> v8::Integer::New(int32_t, v8::Isolate*)’ [-fpermissive] ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew() [with T = v8::Object]’: ../node_modules/nan/nan.h:1439:52: instantiated from here ../node_modules/nan/nan.h:324:30: error: no matching function for call to ‘v8::Object::New(v8::Isolate*&)’ ../node_modules/nan/nan.h:324:30: note: candidate is: /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2307:24: note: static v8::Local<v8::Object> v8::Object::New() /home/bigstores/.node-gyp/0.11.11/deps/v8/include/v8.h:2307:24: note: candidate expects 0 arguments, 1 provided ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew(P) [with T = v8::Array, P = int]’: ../node_modules/nan/nan.h:371:3: warning: control reaches end of non-void function [-Wreturn-type] ../node_modules/nan/nan.h: In function ‘v8::Local<T> NanNew() [with T = v8::Object]’: ../node_modules/nan/nan.h:325:3: warning: control reaches end of non-void function [-Wreturn-type] make: *** [Release/obj.target/binding/binding.o] Error 1 make: Leaving directory/home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/broccoli-sass/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/bigstores/.nvm/v0.11.11/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:107:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:879:12)
gyp ERR! System Linux 3.13.0-35-generic
gyp ERR! command "node" "/home/bigstores/.nvm/v0.11.11/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/bigstores/ember-cli-rails-oauth-example/frontend/node_modules/broccoli-sass/node_modules/node-sass
gyp ERR! node -v v0.11.11
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
Build failed
npm ERR! [email protected] install: node build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.13.0-35-generic
npm ERR! command "/home/bigstores/.nvm/v0.11.11/bin/node" "/home/bigstores/.nvm/v0.11.11/bin/npm" "install"
npm ERR! cwd /home/bigstores/ember-cli-rails-oauth-example/frontend
npm ERR! node -v v0.11.11
npm ERR! npm -v 1.3.25
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/bigstores/ember-cli-rails-oauth-example/frontend/npm-debug.log
npm ERR! not ok code 0

Question: looking to see where simple auth fetches the user

in the readme you have: Ember Simple Auth fetches the current user's record from the server and adds it to the store.

where does this happen? I've been looking for and can't seem to find it.. is it built into simple auth? is the /api/v1/user/user_id the default?
thanks!

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.