package current_github

  1. Overview
  2. Docs

Use GitHub to authenticate users.

type t

Configuration for GitHub OAuth single-sign-on.

val v : ?scopes:string list -> client_id:string -> client_secret:string -> unit -> t

Create a configuration using the details provided by GitHub.

val make_login_uri : t -> csrf:string -> Uri.t

Use this as your ~authn in Current_web.Site.v.

val login : t option -> Current_web.Resource.t

The callback page for logins. Add a route to this from the URL you configured when you set up your GitHub OAuth app. If t = None then the page will tell you how to configure it.

val cmdliner : t option Cmdliner.Term.t

Get the configuration from the command-line.

OCaml

Innovation. Community. Security.