Skip to content

Port PoB 2 Oauth API#9812

Draft
vaisest wants to merge 15 commits intoPathOfBuildingCommunity:devfrom
vaisest:oauth-support
Draft

Port PoB 2 Oauth API#9812
vaisest wants to merge 15 commits intoPathOfBuildingCommunity:devfrom
vaisest:oauth-support

Conversation

@vaisest
Copy link
Copy Markdown
Contributor

@vaisest vaisest commented Apr 24, 2026

I can't find relevant issues, but this primarily fixes annoying issues with POESESSID expiring all the time. For imports, this also automatically adds bandit and pantheon choices, as the OAuth API contains info for them.

Probably enables #5418 via the oauth API, though the current scope does not include account:stashes.

Description of the problem being solved:

Steps taken to verify a working solution:

  • Yes

What this PR still needs

I think this is getting quite close to done, but seeing as it is making a lot of changes to a vital part of the UI, it probably needs a lot more testing. I'm not sure I got all of the differences between the PoE site character data and API data. There might be some legacy things that I don't know about, and I'm not sure about other quirks (like for example the league field in the API is nullable: why?). I also can't test other realm imports since I've only ever played on PC.

The account name import doesn't seem to report 404s at all. I'm not sure if this ever worked, because the website just results in a 403 for me.

The UI also doesn't remember previous league/realm choices yet.

Questions about the UX/UI design were also raised on Discord.

Link to a build that showcases this PR:

N/A

Before screenshot:

image

After screenshot:

image

if node.oidx == data.orbitIndex and not data.isMastery then
for _, extendedId in ipairs(importedGroups[proxyGroup].nodes) do
if id == tonumber(extendedId) and inExtendedHashes(id) then
if id == extendedId and inExtendedHashes(tonumber(id)) then
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this doesn't break anything else. The cluster data is exactly the same as previously, but this seemed to be comparing strings to numbers. Type hints / checking would be really useful here, because I'm not sure what is correct here

@vaisest
Copy link
Copy Markdown
Contributor Author

vaisest commented Apr 25, 2026

The import changes will probably end up being rather broad as it seems really difficult to try to combine the old and new UI. Currently trying to make the oauth version simpler and then I can add the account search back in.

I think the oauth version could just be two menus for either logged in or not, but atm rate limiting is an issue (2 per 10s or 5 per 300s) is an issue so it probably needs to have a manual refresh button for looking up realm characters

Path{space}of{space}Building_2026-04-25_15-59-45

@vaisest
Copy link
Copy Markdown
Contributor Author

vaisest commented Apr 26, 2026

The changes seem to break mcagnion's tests, even though the functionality seems to work. I'm not really seeing why that is. Otherwise everything seems to work so far

@mcagnion
Copy link
Copy Markdown
Contributor

If ImportItemsAndSkills now reads charData.level directly :

 local function buildImportPayload(items)
     return {
-        character = { level = DEFAULT_CHARACTER_LEVEL },
+        level = DEFAULT_CHARACTER_LEVEL,
         equipment = items,
     }
 end

@vaisest
Copy link
Copy Markdown
Contributor Author

vaisest commented Apr 26, 2026

If ImportItemsAndSkills now reads charData.level directly :

 local function buildImportPayload(items)
     return {
-        character = { level = DEFAULT_CHARACTER_LEVEL },
+        level = DEFAULT_CHARACTER_LEVEL,
         equipment = items,
     }
 end

Thanks, that was indeed it. Seems very obvious in hindsight lol

Comment thread src/Classes/PoEAPI.lua Outdated
Comment thread src/LaunchServer.lua Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants