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.
 

Authed crest via console

First post
Author
Dran Arcana
Dreddit
Test Alliance Please Ignore
#1 - 2015-06-10 18:17:36 UTC
Is there a way to do authed crest via a console app? Or more accurately, is there a way to reliably get a token outside of a browser?

I am looking to build a on-demand database of a single station's active market orders (not jita, and at most once/day) so that users don't have to wait 40 minutes after logging in to actually use my site, and so the data can be cached and not refreshed unnecessarily. The data/requests/load saved would be exponential if I could figure out a way to do this.

And before anyone suggests it, eve-marketdata is broken and essentially un-maintained, and eve-central doesn't provide enough metadata via their API for what I'm trying to do.
Kali Izia
GoomWaffe
#2 - 2015-06-10 18:56:03 UTC
The actual user authentication has to happen from a browser. Doing anything else is wrong and defeats the purpose of Oauth.

If this is server-side code for your own use, what you should do is follow the normal flow from a browser once. You'll get a refresh token and you can hardcode that into your app.

If this is being distributed and you want other people to use their own tokens, just have the user follow the browser flow once instead.
You can either get fancy and register a URI handler so your app could handle a redirect to something like yourapp://callback, or just have the user copy/paste the refresh token in and then have the app store it.
KillaGouge
Imperial Shipment
Amarr Empire
#3 - 2015-06-15 15:48:18 UTC  |  Edited by: KillaGouge
If you take a look at Evelib, they released a console app that will walk you through getting your token and refresh key.

https://github.com/ezet/evelib

As far as I understand, the refresh key is good indefinitely.

You still have to go through a browser
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#4 - 2015-06-16 11:55:42 UTC
Kali Izia wrote:
The actual user authentication has to happen from a browser. Doing anything else is wrong and defeats the purpose of Oauth.

If this is server-side code for your own use, what you should do is follow the normal flow from a browser once. You'll get a refresh token and you can hardcode that into your app.

If this is being distributed and you want other people to use their own tokens, just have the user follow the browser flow once instead.
You can either get fancy and register a URI handler so your app could handle a redirect to something like yourapp://callback, or just have the user copy/paste the refresh token in and then have the app store it.



The other 'fancy' way of handling it is to embed a webserver into the process, and have it callback to http://localhost:52343/ or similar.

Which is somewhat simpler than a uri handler, much of the time. Blink (I spent some time on it. it's a pita in windows)

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter