AshAuthentication Guide Issues

Following this guide:

Issue #1
Authentication section of user.ex from the guide looks like this:

  authentication do
    strategies do
      password :password do
        identity_field :email
      end
    end

    tokens do
      token_resource Example.Accounts.Token
      signing_secret Example.Accounts.Secrets
    end
  end

When trying to compile this error is given:

Compiling 23 files (.ex)
** (EXIT from #PID<0.98.0>) an exception was raised:
** (Spark.Error.DslError) [nil]
authentication → tokens → enabled?:
The :password authentication strategy requires tokens be enabled.

To fix this error you can either:

  1. disable the :password strategy, or
  2. enable tokens.

I think the tokens section needs:

enabled? true

Issue #2


This link to the LiveView docs doesn’t work

Issue #3

Should use domain instead of api

I’m not sure how to issue a PR for Ash HQ though since I don’t know where HQ sources the guides.

Answer is you submit a PR in the specific repo

You just need to add a line or 2 of code. The line was previously removed due to a misunderstanding.

1 Like

Looking at thees issues I saw that someone fixed the docs, but that’s not reflected in Ash HQ, I wonder why that is.

A new hex version hasn’t been published yet :cry:

Apparently, the docs at AshHQ only get rebuilt when a new version of an application is released, and teensy changes to the docs aren’t enough to trigger a release. But you’re not alone in running into the issue.