Skip to main content

omniauth-mlh (Ruby)

omniauth-mlh is the official Ruby gem for adding "Sign in with MLH" to a Rails/Rack application. It wraps OmniAuth's OAuth 2.0 support and fetches the user's MLH profile.

Setup

  1. Register an application on My MLH to get your client ID and client secret.
  2. Add the gem to your Gemfile and install it.
  3. Configure the OmniAuth middleware (or Devise) with your client ID, secret, and the scopes your app needs.
  4. Handle the OAuth callback — OmniAuth gives you the authenticated user's info.

What you get back

The callback provides the user's core details (id, name, email, etc.), and — depending on the scopes you requested and how you configure expandable fields — additional data such as education, professional experience, social profiles, and address.

:::info Maintainer note Add a concrete config snippet (the exact provider name, options, and expand_fields/scope keys) and a minimal callback example from the gem's current README. :::