[Potlatch-dev] Potlatch2 against "forked" OSM

Eric Wolf ebwolf at gmail.com
Thu Jan 13 18:19:27 GMT 2011


Tom,

Thank you for the reply. I just want to make sure I'm crystal clear.
What do you mean by "OAuth application definition"?

My application.yml has two values that seem related:

  # Default editor
  default_editor: "potlatch2"
  # OAuth consumer key for Potlatch 2
  potlatch2_key: "7VyBMd5g2kiPQRUoa8kmQ"

Is there another config file I'm missing?

-Eric

-=--=---=----=----=---=--=-=--=---=----=---=--=-=-
Eric B. Wolf                           720-334-7734






On Thu, Jan 13, 2011 at 11:04 AM, Tom Hughes <tom at compton.nu> wrote:
> On 13/01/11 17:38, Eric Wolf wrote:
>
>> We have hit a stumbling block. I cannot seem to get Potlatch 2 to
>> authenticate properly with the API. I posted about this once before
>> but I think I was misunderstood. I'm not trying to use Oauth to have
>> Potlatch 2 authenticate against OSM. I am trying to get my copy of
>> Potlatch 2 to behave in regard to my API instance the same way
>> Potlatch 2 on openstreetmap.org behaves.
>>
>> Specifically, I don't see where Potlatch 2 had to be setup as an Oauth
>> client on Openstreetmap.org. I keep trying (and failing) to get Oauth
>> to work. I've setup an Oauth client and copied the consumer_key to the
>> potlatch2_key in application.yml. That doesn't help at all and I don't
>> see why it would because each time I set up a new client, I get a
>> different consumer_key and secret.  Of course, that seems to be the
>> way it should work. Each user needs to setup the client for
>> themselves. That's the idea behind Oauth.
>
> No, you are once again confusing the application key, which is the same for
> all users (for a given web site) and the per-user token.
>
> Normally as you say each user has to authenticate an application the first
> time they user it in order to get that per-user token.
>
> When Potlatch 2 is running as part of the OSM web site (or a clone of it
> like you have) then the per-user token's are generated automatically the
> first time a user starts Potlatch. We can do that because the edit page is
> generated by rails and rails has access to the database where the tokens are
> stored.
>
> I suggest that (a) you make sure you have the correct URL entered in the
> OAuth application definition and (b) you make sure you have cleared any
> existing flash cookies for your domain.
>
> Tom
>
> --
> Tom Hughes (tom at compton.nu)
> http://compton.nu/
>



More information about the Potlatch-dev mailing list