goth VS dex

Compare goth vs dex and see what are their differences.

goth

Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applications. (by markbates)

dex

OpenID Connect (OIDC) identity and OAuth 2.0 provider with pluggable connectors (by dexidp)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
goth dex
7 37
4,993 9,041
- 1.1%
6.2 9.4
6 days ago 2 days ago
Go Go
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

goth

Posts with mentions or reviews of goth. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-31.
  • How to build Auth in 2023 with go?
    6 projects | /r/golang | 31 May 2023
    Also really easy to implement as there are libraries that do all the heavy lifting for you (https://github.com/markbates/goth is a great starting place IMHO)
  • Why use a 'global' anonymous function instead of a named one?
    1 project | /r/golang | 14 Mar 2023
    In the package 'markbates/goth' that provides a client implementation of OAuth 2.0, the authors have defined the function CompleteUserAuth at the package level like this:
  • Authentication in Go? Best practices
    4 projects | /r/golang | 7 Mar 2023
  • Single sign on with LinkedIn
    1 project | /r/golang | 4 Dec 2022
    You can use oauth2. Just take e.g. a look at the dex documentation dex. Dex is not a library but a standalone federated oidc provider. Highly recommended. For libraries take a look at goth.
  • Simple web app, how to do auth?
    11 projects | /r/golang | 2 Nov 2022
  • The impossible case of pitching rust in a web dev shop
    11 projects | /r/programming | 22 Sep 2022
    For the kind of websites I prefer to build -- server side rendered with HTMX/Alpine for the extra niceness -- Rust I think could be a very good fit. The main downside for my personal projects is the ecosystem. E.g., a good standard way to handle CSRF tokens, standardised oauth2 implementations (like https://github.com/markbates/goth in Go), things like that. I found myself having to write a lot of code that just exists in the Go ecosystem. The main downside for a business is that it's going to make it harder to hire, since Rust genuinely requires more skill. Yes, developers will make mistakes in Go, as it's far too easy to do things like access shared memory in dangerous ways. But on the flip side, it's a lot easier for them to deliver a feature. In a choice between shipping a feature that is buggy in hard to detect ways, vs not being able to deliver at all because you can't get developers, I think it's better to ship.
  • เขียน Go ต่อ Oauth ทุกค่าย
    1 project | dev.to | 2 Nov 2021

dex

Posts with mentions or reviews of dex. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-28.
  • Navigating Identity Authentication: From LDAP to Modern Protocols
    2 projects | dev.to | 28 Mar 2024
    Dex: https://dexidp.io
  • Keycloak SSO with Docker Compose and Nginx
    21 projects | news.ycombinator.com | 11 Feb 2024
    Recently I looked into having a relatively simple SSO setup for my homelab. My main objective is that I could easily login with Google or GitHub auth. At my previous job I used both JetBrains Hub [1] and Keycloak but I found both of them a bit of a PITA to setup.

    JetBrains Hub was really, really easy to get going. As was my previous experience with them. The only thing that annoyed me was the lack of a latest tag on their Docker registry. Don't get me wrong, pinned versions are great, but for my personal use I mostly just want to update all my Docker containers in one go.

    On the other hand I found Keycloak very cumbersome to get going. It was pretty easy in dev mode, but I stumbled to get it going in production. AFAIK it had something to do with the wildcard Let's Encrypt cert that I tried to use. But after a couple of hours, I just gave up.

    I finally went with Dex [2]. I had previously put it off because of the lack of documentation, but in the end it was extremely easy to setup. It just required some basic YAML, a SQLite database and a (sub)domain. I combined Dex with the excellent OAuth2 Proxy and a custom Nginx (Proxy Manager) template for an easy two line SSO configuration on all of my internal services.

    In addition to this setup, I also added Cloudflare Access and WAF outside of my home to add some security. I only want to add some CrowdSec to get a little more insights.

    1. https://www.jetbrains.com/hub/

    2. https://dexidp.io/

    3. https://github.com/oauth2-proxy/oauth2-proxy

    3. https://github.com/alex3305/unraid-docker-templates

  • Sign in with GitHub in Go
    1 project | /r/golang | 10 Dec 2023
    Another great option is to use https://github.com/dexidp/dex in an authentication setup. In your app, you federate the authentication to dex using OAuth2. Dex then has a pluggable architecture with built-in connectors for many established identity providers using a variety of protocols: Among others OAuth2, SAML 2 but also GitHub, Google, Gitea and so forth.
  • Show HN: Obligator – An OpenID Connect server for self-hosters
    18 projects | news.ycombinator.com | 11 Oct 2023
  • I made a small program that makes it easier to run commands inside containers
    4 projects | /r/docker | 20 Jun 2023
    dex is well-known: https://github.com/dexidp/dex
  • Keycloak – Open-Source Identity and Access Management Interview
    26 projects | news.ycombinator.com | 18 Jun 2023
    We used keycloak for openid identity provider as well. It is fine to setup keycloak once. But it is painful share the setup with other engineers.

    For local development, we end up using dex (https://dexidp.io). When we need support group/role, we use dex and glauth(https://glauth.github.io). Both dex and glauth can be configured with yaml files. We just created a few yaml files and a docker compose file, every engineer can be brought up the whole environment in a few seconds.

    Also https://www.authelia.com and https://github.com/goauthentik/authentik look pretty promising, if you need more advanced features from them.

  • dex VS boruta-server - a user suggested alternative
    2 projects | 22 May 2023
  • Have you convinced anyone to use Nix or NixOS? Friends? Coworkers?
    5 projects | /r/NixOS | 16 Apr 2023
    I added it as an available option (flake) in Dex: https://github.com/dexidp/dex
  • Okta Access Gateway Alternatives
    2 projects | /r/sysadmin | 28 Mar 2023
  • Is there a good example of an open source non-trivial (DB connection, authentication, authorization, data validation, tests, etc...) Go API?
    14 projects | /r/golang | 25 Jan 2023

What are some alternatives?

When comparing goth and dex you can also consider the following projects:

oauth2 - Go OAuth2

Keycloak - Open Source Identity and Access Management For Modern Applications and Services

go-oauth2-server - A standalone, specification-compliant, OAuth2 server written in Golang.

authelia - The Single Sign-On Multi-Factor portal for web apps

authboss - The boss of http auth.

Ory Hydra - OpenID Certified™ OpenID Connect and OAuth Provider written in Go - cloud native, security-first, open source API security for your infrastructure. SDKs for any language. Works with Hardware Security Modules. Compatible with MITREid.

jwt-go - ARCHIVE - Golang implementation of JSON Web Tokens (JWT). This project is now maintained at:

OpenUnison - Unified Identity Management

gologin - Go login handlers for authentication providers (OAuth1, OAuth2)

oauth2-proxy - A reverse proxy that provides authentication with Google, Azure, OpenID Connect and many more identity providers.

jwt-auth - This package provides json web token (jwt) middleware for goLang http servers

caddy-auth-portal - Authentication Plugin for Caddy v2 implementing Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0 (Github, Google, Facebook, Okta, etc.), SAML Authentication. MFA with App Authenticators and Yubico.