These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

SSO refresh token?

Author
CHELYBA
Brutor Tribe
Minmatar Republic
#1 - 2015-03-12 16:49:48 UTC  |  Edited by: CHELYBA
Hi there. I'm not very experienced in programming in general and EVE API in particular, but I've been playing with CREST and XML API for a while for my market tool. Now I'd like to get access to the market orders with Authenticated CREST.

I'm following the steps described here - https://developers.eveonline.com/resource/single-sign-on and it's generally working.
However I always get "refresh_token": null, access token is fine and works. This corresponds to the response from the manual, but is quite inconvenient since my program is standalone and I'd like to avoid hopping in browser as much as possible.

Also, in a number of examples here I see stuff like this:
        self.settings['accessToken']=response['access_token']
        self.settings['refreshToken']=response['refresh_token']

And further refresh token requests.

So, am I doing something wrong or lack of refresh token is the normal behavior and code like quoted one won't work?
Sorry, if I haven't digged enough before posting here.
Ancient Evils
Association of Commonwealth Enterprises
#2 - 2015-03-12 18:20:37 UTC
i am in a similar boat. I get the access token, but the refresh token is null. Either its broken ccp side OR i need to make anotehr call for the refresh token.

I have tried passing refresh_token as grant_type but this has had no effect.

So, HOW do i get a refresh token.

Thx
SJ Astralana
Syncore
#3 - 2015-03-12 19:16:54 UTC
Does your requested scopes list in the CREST UI include publicData? This is necessary for the refresh token to be returned.

Hyperdrive your production business: Eve Production Manager

Ancient Evils
Association of Commonwealth Enterprises
#4 - 2015-03-12 19:42:29 UTC
yes, on my app details i am set for crest access and requests scopes is public data
CHELYBA
Brutor Tribe
Minmatar Republic
#5 - 2015-03-12 19:43:51 UTC  |  Edited by: CHELYBA
SJ Astralana wrote:
Does your requested scopes list in the CREST UI include publicData? This is necessary for the refresh token to be returned.

Oh, great! Thanks a lot.
I've used the URI from the example (with empty scope=) and thought that settings I've specified in application are enough.
Now I set scope=publicData in first request and it returns refresh token.
Ancient Evils
Association of Commonwealth Enterprises
#6 - 2015-03-12 19:57:40 UTC
i have 'scope'=> 'publicData' and still get a null refresh_token
CHELYBA
Brutor Tribe
Minmatar Republic
#7 - 2015-03-12 20:24:49 UTC  |  Edited by: CHELYBA
Ancient Evils wrote:
i have 'scope'=> 'publicData' and still get a null refresh_token

The point is that you don't only specify it in application settings on developers.eveonline.com, but also put it in the initial url you direct user to:
https://login.eveonline.com/oauth/authorize/?response_type=code&redirect_uri=callbackuri&client_id=client(app)id&scope=publicData&state=uniquestate123

scope=publicData <- this is that matters
Ancient Evils
Association of Commonwealth Enterprises
#8 - 2015-03-12 22:20:54 UTC  |  Edited by: Ancient Evils
Ya, just figured it out myself, came to tell everyone but you beat me to it. I wish there was documentation for crest. I know Foxfour wanted to clean up the old documentation and them implement the self generating version, but right now, old documentation is better than no documentations :/


Thx for your help.