/elm-auth0

Auth0 for elm

Primary LanguageElm

elm-auth0

Basic login/authorization and other goodies for Auth0.

Example

Example for a simple Single Page Application login flow:

cfg = Auht0.config "https://example.auth0.com" (Auth0.ClientId "<clientId>")
url =
    Auth0.authorize cfg
        { responseType = [ Auth0.Token, Auth0.IdToken ]
        , audience = Nothing
        , scope = Nothing
        , state = Nothing
        , redirectUri = Just <| Auth0.RedirectUri "https://example.com/callback"
        , nonce = Just <| Auth0.Nonce "123456"
        , connection = Nothing
        , prompt = Nothing
        }

Learn more

To get a deeper understanding of what's going on, read Auth0 API: