-
Notifications
You must be signed in to change notification settings - Fork 54
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
Implement SteamGuard authentication #15
base: main
Are you sure you want to change the base?
Conversation
A new optional column is read in the CSV file to specify with which TOTP the line must be computed. The implementation is based on the work done in the SailOTP application available on github.com/seiichiro0185/sailotp
Sorry for the crazy lag, no excuse. Nice contribution, if you'd like to rebase happy to reconsider for a merge, otherwise might steal later. |
@@ -57,12 +58,28 @@ func AuthCode(sec string, ts int64) (string, error) { | |||
offset := hash[19] & 0x0f | |||
trunc := hash[offset : offset+4] | |||
trunc[0] &= 0x7F | |||
res := new(big.Int).Mod(new(big.Int).SetBytes(trunc), big.NewInt(1000000)) | |||
return fmt.Sprintf("%06d", res), nil | |||
if strings.TrimSpace(encodeType) == "Steam" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: case-insensitive seems better?
FWIW, if you do want to go ahead with this change, I added an extension point to the That should make it a little easier to integrate with code generation. This is also tangentially related to #33 in that it requires extending the config format. (One idea: A provider of |
What's the status? Happy to ship once it's mergeable. |
A new optional column is read in the CSV file to specify with which TOTP the line must be computed.
The implementation is based on the work done in the SailOTP application available on https://github.com/seiichiro0185/sailotp