Gathering detailed insights and metrics for steam-appticket
Gathering detailed insights and metrics for steam-appticket
Gathering detailed insights and metrics for steam-appticket
Gathering detailed insights and metrics for steam-appticket
npm install steam-appticket
Typescript
Module System
Min. Node Version
Node Version
NPM Version
54.1
Supply Chain
99
Quality
77.1
Maintenance
100
Vulnerability
100
License
TypeScript (53.7%)
JavaScript (46.3%)
Total Downloads
4,374,872
Last Day
5,938
Last Week
58,458
Last Month
257,234
Last Year
1,499,038
21 Stars
24 Commits
7 Forks
5 Watching
2 Branches
1 Contributors
Latest Version
2.0.1
Package Id
steam-appticket@2.0.1
Unpacked Size
45.00 kB
Size
12.25 kB
File Count
23
NPM Version
6.14.16
Node Version
12.22.12
Publised On
26 Aug 2024
Cumulative downloads
Total Downloads
Last day
-25.1%
5,938
Compared to previous day
Last week
17.5%
58,458
Compared to previous week
Last month
14.5%
257,234
Compared to previous month
Last year
71%
1,499,038
Compared to previous year
This module enables you to parse Steam encrypted app tickets provided you know the proper decryption key. This allows you to authenticate Steam users from your game backend without needing to verify with Steam that the ticket is valid.
ticket
- A Buffer
containing the encrypted app ticketencryptionKey
- A Buffer
or hex string containing the app's decryption key1const AppTicket = require('steam-appticket'); 2// OR 3import AppTicket from 'steam-appticket'; 4// OR 5import {parseEncryptedAppTicket} from 'steam-appticket'; 6 7const ticket = Buffer.from('<ticket hex>', 'hex'); 8const decryptionKey = '6ef99262a7da9e9979737d0822d5d66d03eb0c580b305981a505648b3e21b12e'; 9 10console.log(AppTicket.parseEncryptedAppTicket(ticket, decryptionKey));
parseEncryptedAppTicket
returns an object containing these properties:
version
- The version of the app ownership ticketsteamID
- The ticket owner's SteamID, as a SteamID
objectappID
- The ID of the app this ticket authenticatesownershipTicketExternalIP
- A string containing the external IP address of the ticket owner as reported by Steam at the time when the ownership ticket was assignedownershipTicketInternalIP
- Same as above but for their internal IP. If the ticket was generated by steam-user then this may be randomownershipFlags
- A number containing some (probably uninteresting) flagsownershipTicketGenerated
- A Date
object containing the time when this ticket's ownership ticket was assignedlicenses
- An array of integers containing the package IDs for all the licenses the ticket owner owns which grant them this appdlc
- An array of objects, each of which contains:
appID
- The AppID of the piece of DLClicenses
- An array of integers containing the package IDs for all the licenses the ticket owner owns which grant them this DLC. Seems to not work right now.userData
- Whatever data was sent by the user to Steam when they requested the ticketReturns null
if the provided ticket could not be parsed or could not be verified for authenticity. If you get data
returned, it is guaranteed that it has not been tampered with, provided your encryption key has not been compromised.
To determine if a ticket is valid, you should do the following:
userData
matches what you expectIf you want to have a relatively long grace period in which an encrypted app ticket can be used, but you also want to
make sure that it wasn't reused, you can send a nonce to the client and have them build that into their encrypted app
ticket's userData
.
ticket
- A Buffer
containing the ticket you want to parseallowInvalidSignature
- Optional. Pass true
to get back data even if the ticket has no valid signature. Defaults to false
.1const AppTicket = require('steam-appticket'); 2// OR 3import AppTicket from 'steam-appticket'; 4// OR 5import {parseAppTicket} from 'steam-appticket'; 6 7const ticket = Buffer.from('<ticket hex>', 'hex'); 8console.log(AppTicket.parseAppTicket(ticket));
You can also parse an app ticket that isn't encrypted. To do so, use AppTicket.parseAppTicket(ticket)
. It returns
an object with these properties:
authTicket
- A Buffer containing the part of the ticket that's sent to Steam for validationgcToken
- A string containing a 64-bit number which is the ticket's "GC token" (GC stands for "game connect")tokenGenerated
- A Date
object containing the time when this ticket's GC token was generatedsessionExternalIP
- A string containing the ticket owner's external IP address (as reported by Steam) at time of connection
clientConnectionTime
- Time in milliseconds the ticket owner was connected to Steam when they generated this ticket (?)clientConnectionCount
- Number of tickets generated by the ticket owner for this Steam connection (?)version
- The version of the app ownership ticketsteamID
- The ticket owner's SteamID, as a SteamID
objectappID
- The ID of the app this ticket authenticatesownershipTicketExternalIP
- A string containing the external IP address of the ticket owner as reported by Steam at the time when the ownership ticket was assigned
ownershipTicketInternalIP
- Same as above but for their internal IP. If the ticket was generated by steam-user then this may be random
ownershipFlags
- A number containing some (probably uninteresting) flagsownershipTicketGenerated
- A Date
object containing the time when this ticket's ownership ticket was assignedownershipTicketExpires
- Same as above but for when the ownership ticket expireslicenses
- An array of integers containing the package IDs for all the licenses the ticket owner owns which grant them this appdlc
- An array of objects, each of which contains:
appID
- The AppID of the piece of DLClicenses
- An array of integers containing the package IDs for all the licenses the ticket owner owns which grant them this DLC. Seems to not work right now.signature
- A Buffer
containing the signature for the app ownership ticket (uninteresting to you)isExpired
- A boolean indicating whether the app ownership ticket is expiredhasValidSignature
- A boolean indicating whether the app ownership ticket signature is validisValid
- A boolean indicating whether the app ownership ticket is valid
true
for allowInvalidSignature
and the signature is missing, this will be true if the ticket is not expired!Note that you shouldn't rely on an unencrypted app ticket without first verifying it with Steam.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/24 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More