pathfinder icon indicating copy to clipboard operation
pathfinder copied to clipboard

New users are not detected as in corp

Open eophten opened this issue 6 years ago • 7 comments

On v1.5.4 (and on v.1.5.3) we have several users who have been unable to login to pathfinder (private server). They authenticate through SSO but then receive an access denied error (due to corporation restriction on the server). This persists through cache clears, etc. We see the user appear in the members list under their previous corp (NPC corp in this case). Access denied show info on pilot Member List

eophten avatar Nov 29 '19 21:11 eophten

Hi @eophten ,

  1. Make sure the corporationIds set to be whitelisted includes the corpId of "Member of Dark Venture Corporation". https://github.com/exodus4d/pathfinder/blob/aef6d4e0246dfbe240063ca41b8daa016650139d/app/pathfinder.ini#L73-L81
  2. The member "Hubert Meier" changes corp the day you took the sceenshot "for Less than one day"
  • The new corp information might not be updated when Pathfinder requested character data from CCPs ESI API. -> This might take a few hours
  • Pathfinder also caches character data for some hours. You said you cleared the cache to this might not be the issue here

I guess the login issue no longer exists and ESI was updated in the meantime. Pleases retry to login and give feedback.

exodus4d avatar Nov 30 '19 12:11 exodus4d

@exodus4d

  1. Yes, we have our corporation ID listed in our pathfinder.ini. This has worked since our initial install.
  2. Researched timeline for Hubert: joined 2019.11.29 01:43 issue bugged at around 2019.11.29 16:00 successful login 2019.11.30 0900

2a .Do you have guidance on on how long a corp change in game takes to be reflected in the ESI API based on past experience? That is say, do you know the range for "a few hours" so I can provide guidance to my recruiters? Is there way to surface the expiration and last-modified tag for character data in the admin interface? I fully expect there to be a caching layer between the in game DB and the ESI API layer, however 12+ hours seems excessive.

2b. The cache was cleared (also migrated from file to redis in order to attempt to resolve the issue, so super duper cleared). Is the character data caching timeout in pathfinder configurable? For users who receive an access denied (based on PATHFINDER.LOGIN restrictions), would it be possible to lower the cache timeout or is this based on the expiration tag returned in the ESI request?

eophten avatar Nov 30 '19 19:11 eophten

2.a. I would say max time, until CCP ESIs API has the correct (new) corp data is the next downtime.

2.b. We have to differentiate between:

  • A: A character with a valid login cookie (changed corp). This is the case when you see your character image on the login page. When the char image is visible, cookie data is already validated and verified. In case the corp is changed in the meantime. The cookie data becomes invalid (due to a changed corporation, lifetime of the cookie expires,....), you get the error message....
  • B: A character (either with a valid login cookie or not) clicks the "SSO login" button. In this case PF threads the user to be new, until CCP responds with valid login data. Then PF is able to check its own whitelist and decides whether to log him in or not. In case PF already has a character account for this character, charactere data (like corporation data,...) should be updated immediately.

Summary:

  • Using the "SSO login" button forces PF to update existing character data immediately. (ESI has to respond with the new corp data of course)
  • This method can be used even if a user has a login cookie.

Ill do some tests today and check If there is anything in the code, that could be buggy.

exodus4d avatar Dec 01 '19 11:12 exodus4d

More information from user: character portrait did not appeared until successful login until after success on the 30th, he was always using the SSO login button soley before then. This did appear before and after a downtime on the 29th.

Thanks for checking into this.

eophten avatar Dec 01 '19 16:12 eophten

To shed some light on this, the character detail endpoint on ESI was recently changed to 24h cache timer from the previous 1 hour. So it can take up to a day for character corp membership to be reflected accurately in ESI.

The POST /characters/affiliations/ endpoint should be used for determining corp/alliance membership, that one is still on a 1 hour timer.

lukasni avatar Dec 08 '19 06:12 lukasni

Looks like GET /corporations/{corporation_id}/members/ also is only cached for 1 hour as well.

eophten avatar Dec 13 '19 22:12 eophten

I know this is an old bug. But as we have had a surge if new players we often run into this problem, is it possible to get this looked at anytime soon?

mrurb avatar Apr 26 '20 18:04 mrurb