Skip to content

Conversation

StanislavShamrai
Copy link

No description provided.

@britzl
Copy link
Contributor

britzl commented Aug 15, 2024

Excellent! Thank you for the contribution. Could you please also run generatedocs.py to update the .api_script and related documentation files?

lua_pushstring(L, "GetTicketForWebApiResponse_t");
lua_newtable(L);
lua_pushstring(L, "m_hAuthTicket");
lua_pushinteger(L, s->m_hAuthTicket);
Copy link
Contributor

Choose a reason for hiding this comment

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

The documentation recommends that you call CancelAuthTicket() when you are finished using it. Perhaps CancelAuthTicket(s->m_hAuthTicket) should be called here at the end of the function?

https://partner.steamgames.com/doc/api/ISteamUser#GetAuthTicketForWebAp

Copy link
Contributor

Choose a reason for hiding this comment

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

Or actually, CancelAuthTicket() must probably be called once you are done using it in your client code. Not as I initially suggested.

You can perhaps store the s->m_hAuthTicket in g_CurrentAuthTicket or something and provide a function to explicitly cancel the ticket and set g_CurrentAuthTicket to 0. Also done automatically SteamUser_Final() or before calling the function again.

Copy link
Contributor

Choose a reason for hiding this comment

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

@StanislavShamrai did you get a chance to look at this question?

Copy link
Contributor

@britzl britzl left a comment

Choose a reason for hiding this comment

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

See comment about lifecycle of auth ticket

lua_pushstring(L, "GetTicketForWebApiResponse_t");
lua_newtable(L);
lua_pushstring(L, "m_hAuthTicket");
lua_pushinteger(L, s->m_hAuthTicket);
Copy link
Contributor

Choose a reason for hiding this comment

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

Or actually, CancelAuthTicket() must probably be called once you are done using it in your client code. Not as I initially suggested.

You can perhaps store the s->m_hAuthTicket in g_CurrentAuthTicket or something and provide a function to explicitly cancel the ticket and set g_CurrentAuthTicket to 0. Also done automatically SteamUser_Final() or before calling the function again.

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.

2 participants