ezet / evelib

Eve Online Library.NET is an open source C# wrapper for CCPs Eve Online API and other popular Eve Online APIs.
Apache License 2.0
71 stars 36 forks source link

EveCrest with refresh token causes 500 errors #31

Closed jjoekoullas closed 9 years ago

jjoekoullas commented 9 years ago

Plugging in a refresh token and application key into the EveCrest constructor results in getting 500s back.

This may be because I have a nonsense callback registered for my application with CCP. While I'm not completely clear on the SSO implementation, it seems like following the redirect is unnecessary to obtain an authentication token. If that is causing the 500s, it seems this could be a problem for desktop applications where a callback URL makes no sense.

ezet commented 9 years ago

Are you certain it's a refresh token you are passing in, and not an authentication token ? The callback isn't necessary, so that shouldn't be a problem. I am certain it was working when I released it, but maybe they changed something. I'll have a look tomorrow.

jjoekoullas commented 9 years ago

If it's any help, I have the callback URL for my application set to "localhost", which apparently tries to execute under the original domain and coughs up a 500 error. Once again, just guessing that this 500 error gets elevated to a fatal exception.

I obtained the refresh token via cresthelper.com

.... and now I think I see my problem. I was using a refresh token for the cresthelper application key. I'm sure that's what's causing the issue and likely CCP doesn't give an informative error about this, instead we get a 500.

It sounds like I was using an incorrect token and didn't realize it until just now. I'm going to go ahead and close this. Thanks for your time and sorry for the false alarm. This is a great library, thank you for putting the time into it :+1:

ezet commented 9 years ago

That would indeed cause a 500 error, which would throw a CrestException with some more details in it, which you can catch and handle appropriately. You can use the included EveAuth class to get a refresh token for your own ID, which you can use with the Crest module.