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 (t...@compton.nu)
http://compton.nu/

_______________________________________________
Potlatch-dev mailing list
Potlatch-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/potlatch-dev

Reply via email to