Swiftpack.co - shalva97/google-auth-decode as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by shalva97.
shalva97/google-auth-decode v0.0.9
Decode Google Authenticator URI
⭐️ 9
🕓 1 year ago
.package(url: "https://github.com/shalva97/google-auth-decode.git", from: "v0.0.9")


This library will help you to decode Google Auth's URI which looks like this



Download the executables and run them or use the web version from about section. For example download jar from the latest release page and run it:

$ java -jar google-auth-decode-0.0.12-all.jar "otpauth-migration://offline?data=Cj8KFD3GyqSCSm0oh2eyMx4gtDFmy4XZEhhBQ01FIENvOmpvaG5AZXhhbXBsZS5jb20aB0FDTUUgQ28gASgBMAIKWQoUmWnif8JDwjlbrmF6aCME%2FSEWkVkSJUtvdGxpbiBnb29kIGphdmEgYmFkOmpvaG5AZXhhbXBsZS5jb20aFEtvdGxpbiBnb29kIGphdmEgYmFkIAEoATACCjkKFE62Apiv1fDVj9%2Fm5dEtIK60BBmfEhVCbGFoOmpvaG5AZXhhbXBsZS5jb20aBEJsYWggASgBMAIKOQoU%2FPHoXjuc6zFhB5ahA9TzNUCu7SwSFWFzZGY6am9obkBleGFtcGxlLmNvbRoEYXNkZiABKAEwAhABGAEgACiHg9OF%2Bf%2F%2F%2F%2F8B"
OTPData(name=ACME Co:[email protected], algorithm=ALGORITHM_SHA1, issuer=ACME Co, secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ, type=TOTP)
OTPData(name=Kotlin good java bad:[email protected], algorithm=ALGORITHM_SHA1, issuer=Kotlin good java bad, secret=TFU6E76CIPBDSW5OMF5GQIYE7UQRNEKZ, type=TOTP)
OTPData(name=Blah:[email protected], algorithm=ALGORITHM_SHA1, issuer=Blah, secret=J23AFGFP2XYNLD6743S5CLJAV22AIGM7, type=TOTP)
OTPData(name=asdf:[email protected], algorithm=ALGORITHM_SHA1, issuer=asdf, secret=7TY6QXR3TTVTCYIHS2QQHVHTGVAK53JM, type=TOTP)


Step 1. Add it in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }

or in settings.gradle

dependencyResolutionManagement {
    repositories {
        maven { url "https://jitpack.io" }

Step 2. Add the dependency



There is an extension fun String.decodeGoogleAuthMigrationURI(), which you can use like this

val listOfOTPs = "otpauth-migration://offline?data=...".decodeGoogleAuthMigrationURI()
listOfOTPs // will be a list of all the OTP data contained in the URI

// java
String uriText = "otpauth-migration://offline?data=...";
var listOfOTPs = GoogleAuthDecoderKt.decodeGoogleAuthMigrationURI(uriText);

Build from source

clone the repository and in the project directory run ./gradlew shadowjar then inside build/libs folder should be a jar file which you can run with java -jar filename-all.jar "otpauth-..."

Similar projects


Stars: 9
Last commit: 3 days ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

version v0.0.19
50 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics