{"id":21901101,"url":"https://github.com/citrix/citrix-auth-mfa-script-samples","last_synced_at":"2026-04-13T12:01:18.295Z","repository":{"id":66953775,"uuid":"546823775","full_name":"citrix/citrix-auth-mfa-script-samples","owner":"citrix","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-17T21:21:09.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-22T06:16:28.926Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/citrix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-06T17:53:39.000Z","updated_at":"2023-02-10T10:50:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"85a2b783-e8b7-483a-8ded-a8fcb15460f5","html_url":"https://github.com/citrix/citrix-auth-mfa-script-samples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/citrix/citrix-auth-mfa-script-samples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citrix%2Fcitrix-auth-mfa-script-samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citrix%2Fcitrix-auth-mfa-script-samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citrix%2Fcitrix-auth-mfa-script-samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citrix%2Fcitrix-auth-mfa-script-samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citrix","download_url":"https://codeload.github.com/citrix/citrix-auth-mfa-script-samples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citrix%2Fcitrix-auth-mfa-script-samples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T15:12:18.541Z","updated_at":"2026-04-13T12:01:18.248Z","avatar_url":"https://github.com/citrix.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Examples of scripts for authentication against Citrix MFA\n\nIncludes examples for Javascript, Python and C#\n\nAll examples use Selenium and an external library to calculate the TOTP code for MFA.\n\nThe MFA_SECRET in each example is the MFA key or secret generated at the time of registering an MFA device. \nCitrix displays the QR and the key. The QR code contains the key, but the key can be copied down and supplied to the scripts below.\nThe same key can be used in multiple devices and they will generate the same TOTP code so long as the client and server clocks are in sync.\n\n## C#\nTOTP Library: **TwoStepsAuthenticator** - (https://github.com/glacasa/TwoStepsAuthenticator)\n\nRequired Nuget Packages: \n- DotNetSeleniumExtras.WaitHelpers\n- Selenium.WebDriver\n- Selenium.WebDriver.ChromeDriver\n- TwoStepsAuthenticator\n\nTOTP code Example:\n```\nvar authenticator = new TwoStepsAuthenticator.TimeAuthenticator();\nvar code = authenticator.GetCode(MFA_SECRET);\n```\n\n## Python\nTOTP Library: **Pythoauth** - (https://github.com/pyauth/pyotp)\n\nPython Packages:\n- pyotp\n- Selenium\n\nTOTP code Example:\n```\nvar totp = pyotp.TOTP(MFA_SECRET)\nvar code = totp.now()\n```\n\n## Javascript\nTOTP Library: **OTPLib** - (https://github.com/yeojz/otplib)\n\nUses NodeJS. Requires the packages:\n- selenium-webdriver\n- otplib\n\nTOTP code Example:\n```\nconst otplib = require('otplib');\n\nconst secret = 'mfaSecret';\nconst token = otplib.authenticator.generate(MFA_SECRET);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitrix%2Fcitrix-auth-mfa-script-samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitrix%2Fcitrix-auth-mfa-script-samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitrix%2Fcitrix-auth-mfa-script-samples/lists"}