{"id":21096845,"url":"https://github.com/stytchauth/stytch-go","last_synced_at":"2026-01-24T01:13:27.184Z","repository":{"id":37848539,"uuid":"311438495","full_name":"stytchauth/stytch-go","owner":"stytchauth","description":"Official Stytch Backend SDK for Go","archived":false,"fork":false,"pushed_at":"2026-01-16T23:58:23.000Z","size":1727,"stargazers_count":62,"open_issues_count":2,"forks_count":13,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-01-18T06:08:38.740Z","etag":null,"topics":["authentication","golang","sdk","stytch"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stytchauth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-11-09T19:06:15.000Z","updated_at":"2026-01-16T23:58:19.000Z","dependencies_parsed_at":"2023-02-09T17:31:10.788Z","dependency_job_id":"657110e8-dcdb-4b16-9031-8d26fefc8193","html_url":"https://github.com/stytchauth/stytch-go","commit_stats":{"total_commits":170,"total_committers":25,"mean_commits":6.8,"dds":0.7294117647058824,"last_synced_commit":"fc75688561216aa426393e38e4519a080228606b"},"previous_names":[],"tags_count":173,"template":false,"template_full_name":null,"purl":"pkg:github/stytchauth/stytch-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stytchauth%2Fstytch-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stytchauth%2Fstytch-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stytchauth%2Fstytch-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stytchauth%2Fstytch-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stytchauth","download_url":"https://codeload.github.com/stytchauth/stytch-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stytchauth%2Fstytch-go/sbom","scorecard":{"id":36574,"data":{"date":"2025-08-04","repo":{"name":"github.com/stytchauth/stytch-go","commit":"82bf134693396de507c2e5f4c52673ddeaaf7df6"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":6.6,"checks":[{"name":"Maintained","score":10,"reason":"15 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/auto-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/check-links.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/auto-publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/stytchauth/stytch-go/auto-publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/auto-publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/stytchauth/stytch-go/auto-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/stytchauth/stytch-go/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/stytchauth/stytch-go/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/stytchauth/stytch-go/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/stytchauth/stytch-go/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/stytchauth/stytch-go/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-links.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/stytchauth/stytch-go/check-links.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Info: codeowner review is required on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":9,"reason":"SAST tool is not run on all commits -- score normalized to 9","details":["Warn: 29 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-14T20:27:33.837Z","repository_id":37848539,"created_at":"2025-08-14T20:27:33.837Z","updated_at":"2025-08-14T20:27:33.837Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28647538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["authentication","golang","sdk","stytch"],"created_at":"2024-11-19T22:44:25.716Z","updated_at":"2026-01-22T00:07:51.578Z","avatar_url":"https://github.com/stytchauth.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stytch Go Library\n\nThe Stytch Go library makes it easy to use the Stytch user infrastructure API in Go applications.\n\nIt pairs well with the Stytch [Web SDK](https://www.npmjs.com/package/@stytch/vanilla-js) or your own custom authentication flow.\n\n## Install\n\n```console\n$ go get github.com/stytchauth/stytch-go/v16\n```\n\n## Usage\n\nYou can find your API credentials in the [Stytch Dashboard](https://stytch.com/dashboard/api-keys).\n\nThis client library supports all Stytch's live products:\n\n### B2C\n\n  - [x] [Email Magic Links](https://stytch.com/docs/api/send-by-email)\n  - [x] [Embeddable Magic Links](https://stytch.com/docs/guides/magic-links/embeddable-magic-links/api)\n  - [x] [OAuth logins](https://stytch.com/docs/guides/oauth/idp-overview)\n  - [x] [SMS passcodes](https://stytch.com/docs/api/send-otp-by-sms)\n  - [x] [WhatsApp passcodes](https://stytch.com/docs/api/whatsapp-send)\n  - [x] [Email passcodes](https://stytch.com/docs/api/send-otp-by-email)\n  - [x] [Session Management](https://stytch.com/docs/guides/sessions/using-sessions)\n  - [x] [WebAuthn](https://stytch.com/docs/guides/webauthn/api)\n  - [x] [Time-based one-time passcodes (TOTPs)](https://stytch.com/docs/guides/totp/api)\n  - [x] [Crypto wallets](https://stytch.com/docs/guides/web3/api)\n  - [x] [Passwords](https://stytch.com/docs/guides/passwords/api)\n  - [x] [M2M](https://stytch.com/docs/api/m2m-client)\n\n### B2B\n\n- [x] [Organizations](https://stytch.com/docs/b2b/api/organization-object)\n- [x] [Members](https://stytch.com/docs/b2b/api/member-object)\n- [x] [Email Magic Links](https://stytch.com/docs/b2b/api/send-login-signup-email)\n- [x] [OAuth logins](https://stytch.com/docs/b2b/api/oauth-google-start)\n- [x] [Session Management](https://stytch.com/docs/b2b/api/session-object)\n- [x] [Single-Sign On](https://stytch.com/docs/b2b/api/sso-authenticate-start)\n- [x] [Discovery](https://stytch.com/docs/b2b/api/discovered-organization-object)\n- [x] [Passwords](https://stytch.com/docs/b2b/api/passwords-authenticate)\n\n### Example B2C usage\nCreate an API client:\n```go\nimport (\n\t\"context\"\n\n\t\"github.com/stytchauth/stytch-go/v16/stytch\"\n\t\"github.com/stytchauth/stytch-go/v16/stytch/consumer/stytchapi\"\n)\n\nstytchAPIClient, err := stytchapi.NewClient(\n\t\"project-live-c60c0abe-c25a-4472-a9ed-320c6667d317\",\n\t\"secret-live-80JASucyk7z_G8Z-7dVwZVGXL5NT_qGAQ2I=\",\n)\nif err != nil {\n\tpanic(err)\n}\n```\n\nSend a magic link by email:\n```go\n\tres, err := stytchAPIClient.MagicLinks.Email.Send(\n\t\tcontext.Background(),\n\t\t\u0026stytch.MagicLinksEmailSendParams{\n\t\t\tEmail: \"sandbox@stytch.com\",\n\t\t\tAttributes: stytch.Attributes{\n\t\t\t\tIPAddress: \"10.0.0.0\",\n\t\t\t},\n\t\t},\n\t)\n```\n\nAuthenticate the token from the magic link:\n```go\n\tres, err := stytchAPIClient.MagicLinks.Authenticate(\n\t\tcontext.Background(),\n\t\t\u0026stytch.MagicLinksAuthenticateParams{\n\t\t\tToken:      \"DOYoip3rvIMMW5lgItikFK-Ak1CfMsgjuiCyI7uuU94=\",\n\t\t\tOptions:    stytch.Options{IPMatchRequired: true},\n\t\t\tAttributes: stytch.Attributes{IPAddress: \"10.0.0.0\"},\n\t\t})\n```\n\nGet all users\n```go\n    res, err := stytchAPIClient.Users.Search(\n\t\tcontext.Background(),\n\t\t\u0026stytch.UsersSearchParams{\n\t\t\tLimit: 1000\n\t\t})\n```\n\nSearch users\n```go\n\tres, err := stytchAPIClient.Users.Search(\n\t\tcontext.Background(),\n\t\t\u0026stytch.UsersSearchParams{\n\t\t\tLimit: 1000,\n\t\t\tQuery: stytch.UsersSearchQuery{\n\t\t\t\tOperator: stytch.UserSearchOperatorOR,\n\t\t\t\tOperands: []json.Marshaler{\n\t\t\t\t\tstytch.UsersSearchQueryPhoneVerifiedFilter{true},\n\t\t\t\t\tstytch.UsersSearchQueryEmailVerifiedFilter{true},\n\t\t\t\t\tstytch.UsersSearchQueryWebAuthnRegistrationVerifiedFilter{true},\n\t\t\t\t}\n\t\t\t}\n\t\t})\n```\n\nIterate over all pages of users for a search query\n```go\n\tvar users []stytch.User\n\titer := stytchAPIClient.Users.SearchAll(\u0026stytch.UsersSearchParams{})\n\tfor iter.HasNext() {\n\t\tres, err := iter.Next(context.Background())\n\t\tif err != nil {\n\t\t\tfmt.Println(err)\n\t\t\treturn nil, err\n\t\t}\n\t\tusers = append(users, res...)\n\t}\n```\n\n### Example B2B usage\n\nCreate an API client:\n```go\nimport (\n\"context\"\n\n\"github.com/stytchauth/stytch-go/v16/stytch\"\n\"github.com/stytchauth/stytch-go/v16/stytch/b2b/b2bstytchapi\"\n\"github.com/stytchauth/stytch-go/v16/stytch/b2b/organizations\"\n)\n\nstytchClient, err := b2bstytchapi.NewClient(\n\"project-test-uuid\",\n\"secret-test-uuid\",\n)\nif err != nil {\npanic(err)\n}\n```\n\nCreate an organization\n\n```go\nparams := \u0026organizations.CreateParams{\n    OrganizationName: \"Example Org Inc.\",\n    OrganizationSlug: \"example-org\",\n}\n\nresp, err := client.Organizations.Create(context.Background(), params)\nif err != nil {\n    log.Fatalf(\"error in method call: %v\", err)\n}\n```\n\nLog the first user into the organization\n\n```go\nimport (\n\"context\"\n\"log\"\n\n\"github.com/stytchauth/stytch-go/v16/stytch/b2b/b2bstytchapi\"\n\"github.com/stytchauth/stytch-go/v16/stytch/b2b/magiclinks/email\"\n)\nparams := \u0026email.LoginOrSignupParams{\n    OrganizationID: \"organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931\",\n    EmailAddress:   \"sandbox@stytch.com\",\n}\n\nresp, err := client.MagicLinks.Email.LoginOrSignup(context.Background(), params)\nif err != nil {\n    log.Fatalf(\"error in method call: %v\", err)\n}\n```\n\n## Handling Errors\n\nWhen possible Stytch returns an error prepended with `Stytch Error`.\nAdditionally, the error should include a type that can be used to distinguish errors.\n\nLearn more about errors in the [docs](https://stytch.com/docs/api/errors).\n\n## Documentation\n\nSee example requests and responses for all the endpoints in the [Stytch API Reference](https://stytch.com/docs/api).\n\nFollow one of the [integration guides](https://stytch.com/docs/guides) or start with one of our [example apps](https://stytch.com/docs/example-apps).\n\n## Support\n\nIf you've found a bug, [open an issue](https://github.com/stytchauth/stytch-go/issues/new)!\n\nIf you have questions or want help troubleshooting, join us in [Slack](https://stytch.com/docs/resources/support/overview) or email support@stytch.com.\n\nIf you've found a security vulnerability, please follow our [responsible disclosure instructions](https://stytch.com/docs/resources/security-and-trust/security#:~:text=Responsible%20disclosure%20program).\n\n## Development\n\nSee [DEVELOPMENT.md](DEVELOPMENT.md)\n\n## Code of Conduct\n\nEveryone interacting in the Stytch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstytchauth%2Fstytch-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstytchauth%2Fstytch-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstytchauth%2Fstytch-go/lists"}