-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined method `match' for nil:NilClass #39
Comments
@krunal - can you try upgrading to the latest beta? Version |
Getting same error with version 0.1.29.beta5. |
@krunal - one of the files from the stacktrace ( |
Started GET "/auth/linkedin/callback" for 127.0.0.1 at 2014-10-01 16:55:52 -0500 NoMethodError (undefined method |
Thanks @krunal, I'll take a look ASAP. |
@krunal - I'm having trouble reproducing this issue, but it looks like the client is failing to append the Here is an example of a successful request. Note the Started GET "/auth/github?auth_origin_url=http%3A%2F%2Fng-token-auth.dev%2F" for 127.0.0.1 at 2014-10-02 11:38:57 -0500 This is your failing request. There is no Started GET "/auth/linkedin" for 127.0.0.1 at 2014-09-30 20:59:55 -0500 Can you think of a reason why this value would be missing? ng-token-auth automatically appends the param so it shouldn't be an issue with normal use. |
I was hitting the url through browser instead of angularjs. I think thats the problem. |
Cool - I should probably make a note in the readme about this. Thanks @krunal! |
I am having the same issue but I am not using angularjs. The following is my backtrace: NoMethodError in DeviseTokenAuth::OmniauthCallbacksController#omniauth_success Extracted source (around line #158): # ensure that hash-bang is present BEFORE querystring for angularjs
unless url.match(/#/)
auth_url += '#'
end devise_token_auth (0.1.32.beta5) app/controllers/devise_token_auth/omniauth_callbacks_controller.rb:158:in I am using the following gems: gem 'rails', '4.2'
gem 'rails-api', '~> 0.4.0'
gem 'spring', :group => :development
gem 'sqlite3'
gem 'devise_token_auth', '~> 0.1.31'
# OmniAuth authentication provider gems
gem 'omniauth-facebook', '~> 2.0.1'
gem 'omniauth-twitter', '~> 1.1.0' I would really appreciate any help! Thanks :) |
Getting below error while trying to integrate with facebook or linkedin.
Backtrace
Started GET "/auth/linkedin" for 127.0.0.1 at 2014-09-30 20:59:55 -0500
ActiveRecord::SchemaMigration Load (0.1ms) SELECT
schema_migrations
.* FROMschema_migrations
Started GET "/omniauth/linkedin?resource_class=User" for 127.0.0.1 at 2014-09-30 20:59:55 -0500
I, [2014-09-30T20:59:55.874961 #26214] INFO -- omniauth: (linkedin) Request phase initiated.
Started GET "/omniauth/linkedin/callback?resource_class=User&oauth_token=75--c7c0dd37-c720-425f-acac-f1218cbad003&oauth_verifier=93853" for 127.0.0.1 at 2014-09-30 21:00:17 -0500
I, [2014-09-30T21:00:17.880395 #26214] INFO -- omniauth: (linkedin) Callback phase initiated.
Processing by DeviseTokenAuth::AuthController#omniauth_success as HTML
Parameters: {"resource_class"=>"User", "oauth_token"=>"75--c7c0dd37-c720-425f-acac-f1218cbad003", "oauth_verifier"=>"93853", "provider"=>"linkedin"}
User Load (0.2ms) SELECT
users
.* FROMusers
WHEREusers
.uid
= '2UgVGWV5v_' ANDusers
.provider
= 'linkedin' ORDER BYusers
.id
ASC LIMIT 1Completed 500 Internal Server Error in 49ms
NoMethodError (undefined method
match' for nil:NilClass): devise_token_auth (0.1.28.beta6) app/controllers/devise_token_auth/auth_controller.rb:128:in
generate_url'devise_token_auth (0.1.28.beta6) app/controllers/devise_token_auth/auth_controller.rb:36:in
omniauth_success' actionpack (4.1.6) lib/action_controller/metal/implicit_render.rb:4:in
send_action'actionpack (4.1.6) lib/abstract_controller/base.rb:189:in
process_action' actionpack (4.1.6) lib/action_controller/metal/rendering.rb:10:in
process_action'actionpack (4.1.6) lib/abstract_controller/callbacks.rb:20:in
block in process_action' activesupport (4.1.6) lib/active_support/callbacks.rb:113:in
call'activesupport (4.1.6) lib/active_support/callbacks.rb:113:in
call' activesupport (4.1.6) lib/active_support/callbacks.rb:229:in
block in halting'activesupport (4.1.6) lib/active_support/callbacks.rb:215:in
call' activesupport (4.1.6) lib/active_support/callbacks.rb:215:in
block in halting_and_conditional'activesupport (4.1.6) lib/active_support/callbacks.rb:166:in
call' activesupport (4.1.6) lib/active_support/callbacks.rb:166:in
block in halting'activesupport (4.1.6) lib/active_support/callbacks.rb:229:in
call' activesupport (4.1.6) lib/active_support/callbacks.rb:229:in
block in halting'activesupport (4.1.6) lib/active_support/callbacks.rb:166:in
call' activesupport (4.1.6) lib/active_support/callbacks.rb:166:in
block in halting'activesupport (4.1.6) lib/active_support/callbacks.rb:166:in
call' activesupport (4.1.6) lib/active_support/callbacks.rb:166:in
block in halting'activesupport (4.1.6) lib/active_support/callbacks.rb:166:in
call' activesupport (4.1.6) lib/active_support/callbacks.rb:166:in
block in halting'activesupport (4.1.6) lib/active_support/callbacks.rb:149:in
call' activesupport (4.1.6) lib/active_support/callbacks.rb:149:in
block in halting_and_conditional'activesupport (4.1.6) lib/active_support/callbacks.rb:86:in
call' activesupport (4.1.6) lib/active_support/callbacks.rb:86:in
run_callbacks'actionpack (4.1.6) lib/abstract_controller/callbacks.rb:19:in
process_action' actionpack (4.1.6) lib/action_controller/metal/rescue.rb:29:in
process_action'actionpack (4.1.6) lib/action_controller/metal/instrumentation.rb:31:in
block in process_action' activesupport (4.1.6) lib/active_support/notifications.rb:159:in
block in instrument'activesupport (4.1.6) lib/active_support/notifications/instrumenter.rb:20:in
instrument' activesupport (4.1.6) lib/active_support/notifications.rb:159:in
instrument'actionpack (4.1.6) lib/action_controller/metal/instrumentation.rb:30:in
process_action' actionpack (4.1.6) lib/action_controller/metal/params_wrapper.rb:250:in
process_action'activerecord (4.1.6) lib/active_record/railties/controller_runtime.rb:18:in
process_action' actionpack (4.1.6) lib/abstract_controller/base.rb:136:in
process'actionview (4.1.6) lib/action_view/rendering.rb:30:in
process' actionpack (4.1.6) lib/action_controller/metal.rb:196:in
dispatch'actionpack (4.1.6) lib/action_controller/metal/rack_delegation.rb:13:in
dispatch' actionpack (4.1.6) lib/action_controller/metal.rb:232:in
block in action'actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:82:in
call' actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:82:in
dispatch'actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:50:in
call' actionpack (4.1.6) lib/action_dispatch/journey/router.rb:73:in
block in call'actionpack (4.1.6) lib/action_dispatch/journey/router.rb:59:in
each' actionpack (4.1.6) lib/action_dispatch/journey/router.rb:59:in
call'actionpack (4.1.6) lib/action_dispatch/routing/route_set.rb:678:in
call' omniauth (1.2.2) lib/omniauth/strategy.rb:404:in
call_app!'omniauth (1.2.2) lib/omniauth/strategy.rb:362:in
callback_phase' omniauth-oauth (1.0.1) lib/omniauth/strategies/oauth.rb:58:in
callback_phase'omniauth (1.2.2) lib/omniauth/strategy.rb:227:in
callback_call' omniauth (1.2.2) lib/omniauth/strategy.rb:184:in
call!'omniauth (1.2.2) lib/omniauth/strategy.rb:164:in
call' omniauth (1.2.2) lib/omniauth/strategy.rb:186:in
call!'omniauth (1.2.2) lib/omniauth/strategy.rb:164:in
call' omniauth (1.2.2) lib/omniauth/strategy.rb:186:in
call!'omniauth (1.2.2) lib/omniauth/strategy.rb:164:in
call' omniauth (1.2.2) lib/omniauth/builder.rb:59:in
call'warden (1.2.3) lib/warden/manager.rb:35:in
block in call' warden (1.2.3) lib/warden/manager.rb:34:in
catch'warden (1.2.3) lib/warden/manager.rb:34:in
call' rack (1.5.2) lib/rack/etag.rb:23:in
call'rack (1.5.2) lib/rack/conditionalget.rb:25:in
call' rack (1.5.2) lib/rack/head.rb:11:in
call'actionpack (4.1.6) lib/action_dispatch/middleware/params_parser.rb:27:in
call' actionpack (4.1.6) lib/action_dispatch/middleware/flash.rb:254:in
call'rack (1.5.2) lib/rack/session/abstract/id.rb:225:in
context' rack (1.5.2) lib/rack/session/abstract/id.rb:220:in
call'actionpack (4.1.6) lib/action_dispatch/middleware/cookies.rb:560:in
call' activerecord (4.1.6) lib/active_record/query_cache.rb:36:in
call'activerecord (4.1.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in
call' activerecord (4.1.6) lib/active_record/migration.rb:380:in
call'actionpack (4.1.6) lib/action_dispatch/middleware/callbacks.rb:29:in
block in call' activesupport (4.1.6) lib/active_support/callbacks.rb:82:in
run_callbacks'actionpack (4.1.6) lib/action_dispatch/middleware/callbacks.rb:27:in
call' actionpack (4.1.6) lib/action_dispatch/middleware/reloader.rb:73:in
call'actionpack (4.1.6) lib/action_dispatch/middleware/remote_ip.rb:76:in
call' actionpack (4.1.6) lib/action_dispatch/middleware/debug_exceptions.rb:17:in
call'actionpack (4.1.6) lib/action_dispatch/middleware/show_exceptions.rb:30:in
call' railties (4.1.6) lib/rails/rack/logger.rb:38:in
call_app'railties (4.1.6) lib/rails/rack/logger.rb:20:in
block in call' activesupport (4.1.6) lib/active_support/tagged_logging.rb:68:in
block in tagged'activesupport (4.1.6) lib/active_support/tagged_logging.rb:26:in
tagged' activesupport (4.1.6) lib/active_support/tagged_logging.rb:68:in
tagged'railties (4.1.6) lib/rails/rack/logger.rb:20:in
call' actionpack (4.1.6) lib/action_dispatch/middleware/request_id.rb:21:in
call'rack (1.5.2) lib/rack/methodoverride.rb:21:in
call' rack (1.5.2) lib/rack/runtime.rb:17:in
call'activesupport (4.1.6) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in
call' rack (1.5.2) lib/rack/lock.rb:17:in
call'actionpack (4.1.6) lib/action_dispatch/middleware/static.rb:64:in
call' rack (1.5.2) lib/rack/sendfile.rb:112:in
call'railties (4.1.6) lib/rails/engine.rb:514:in
call' railties (4.1.6) lib/rails/application.rb:144:in
call'rack (1.5.2) lib/rack/lock.rb:17:in
call' rack (1.5.2) lib/rack/content_length.rb:14:in
call'rack (1.5.2) lib/rack/handler/webrick.rb:60:in
service' /home/krunal/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/webrick/httpserver.rb:138:in
service'/home/krunal/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/webrick/httpserver.rb:94:in
run' /home/krunal/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/webrick/server.rb:191:in
block in start_thread'The text was updated successfully, but these errors were encountered: