Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added user_get_auth_ticket_for_web_api #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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

@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