Skip to content

Instantly share code, notes, and snippets.

@rifting
Last active October 16, 2024 01:14
Show Gist options
  • Save rifting/732a45adf8ebacfa0e1fda0a66662570 to your computer and use it in GitHub Desktop.
Save rifting/732a45adf8ebacfa0e1fda0a66662570 to your computer and use it in GitHub Desktop.
@rifting
Copy link
Author

rifting commented Sep 5, 2024

As pointed out by a member of r/familylink, it's also worth nothing that oathtool can generate these codes too.

  • Get shared secret in base32 echo -n <shared secret> | base32
  • Call with 60s timestamp duration for the start of the hour you'd like to generate a code for oathtool -b -s 60s -N "`date +"%F %H:00:00 %Z"`" --totp <shared secret in base32>

This isn't really practical but I can see some small uses for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment