skiedude / evestructures

An ESI/SSO backed website enabling Eve Online Corporations to view and manage all their owned Structures in New Eden
https://structures.eveskillboard.com
MIT License
22 stars 12 forks source link

SSO changes #48

Closed Marius8 closed 3 years ago

Marius8 commented 3 years ago

As announced here CCP is moving the auth endpoints to V2 and deprecating the old ones. will this be updated to reflect these changes?

skiedude commented 3 years ago

I do not, however here is the quick way I got it working on eveskillboard if you want to do it $authsite = 'https://login.eveonline.com/v2/oauth/token'

And getting the characterid and such out of it $resp = $client->post($authsite, $token_headers); $tokens = json_decode($resp->getBody()); $tokenParts = explode(".", $tokens->access_token); $tokenPayload = base64_decode($tokenParts[1]); $payload = json_decode($tokenPayload); $character_id = explode(":", $payload->sub); $character_id = $character_id[2];

And since the access tokens are so long, you will want to alter that column in the database to TEXT to account for the length since varcharr(255) is not long enough