[openstreetmap/openstreetmap-website] no more log in the web site after configuring oauth keys

Tom Hughes tom at compton.nu
Fri Dec 2 11:38:22 UTC 2016


On 02/12/16 11:08, Jean-Claude Jouffre wrote:

> Started GET "/" for 172.17.0.1 at 2016-12-02 13:51:19 +0100
> Processing by SiteController#index as HTML
>   User Load (0.5ms)  SELECT  "users".* FROM "users" WHERE "users"."id" =
> $1 AND (status IN ('active', 'confirmed', 'suspended'))  ORDER BY
> "users"."id" ASC LIMIT 1  [["id", 5000000]]
>   ClientApplication Load (0.5ms)  SELECT  "client_applications".* FROM
> "client_applications" WHERE "client_applications"."key" = $1 LIMIT 1
> [["key", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\""]]
> Completed 500 Internal Server Error in 26ms (ActiveRecord: 2.2ms)
> NoMethodError (undefined method `access_token_for_user' for nil:NilClass):
>   app/models/user.rb:243:in `access_token'
>   app/controllers/application_controller.rb:50:in `require_oauth'
>   config/initializers/cors.rb:9:in `call'
>
> Can you please help me ?

Well apparently you either haven't configured a key or you have 
configured one for a client application that doesn't exist in the database.

And please, please, remove the [openstreetmap/openstreetmap-website] 
prefix from these manually sent emails. I told you it's not necessary 
and I just spent ages trying to find this issue on github to reply to it 
only to eventually realise it wasn't there!

Tom

-- 
Tom Hughes (tom at compton.nu)
http://compton.nu/



More information about the rails-dev mailing list