FeriendatenWeb.AuthController.init/1 is undefined
https://github.com/team-alembic/ash_authentication_phoenix says "This is beta software. Please don't use it without talking to us!". I did use it without talking to you and here we are. 😉
I followed the installation manual for a Phoenix application. When I try to start the server with
mix phx.server
I'll get the error message FeriendatenWeb.AuthController.init/1 is undefined (module FeriendatenWeb.AuthController is not available or is yet to be defined)``
I've never created an
AuthController` because the installation manual didn't say so. Is there a step by step tutorial how to start with a vanilla Phoenix application?GitHub
GitHub - team-alembic/ash_authentication_phoenix: Drop-in authentic...
Drop-in authentication support for Phoenix apps using AshAuthentication. - GitHub - team-alembic/ash_authentication_phoenix: Drop-in authentication support for Phoenix apps using AshAuthentication.
7 Replies
Hi @Stefan Wintermeyer , you must indeed create an AuthController.
You can check out my auth example, where I mention this error and potential other problems while setting up AshAuthentication.Phoenix: https://github.com/axelbdt/ash_authentication_phoenix_example
GitHub
GitHub - axelbdt/ash_authentication_phoenix_example: The simplest p...
The simplest password authentication with Ash Framework, Ash Authentication and Phoenix. - GitHub - axelbdt/ash_authentication_phoenix_example: The simplest password authentication with Ash Framewo...
TBH that beta warning should be removed
I removed it from ash authentication
Didn’t realize there was one there.
We definitely need to rectify this issue. Because everyone seems to get to this point. But in the guide we say to create an auth controller: https://ash-hq.org/docs/guides/ash_authentication/3.7.3/tutorials/integrating-ash-authentication-and-phoenix#ashauthentication-phoenix-controller
Ash HQ
Guide: Integrating Ash Authentication And Phoenix
Read the "Integrating Ash Authentication And Phoenix" guide on Ash HQ
So I’m not sure what’s going on 😂
Is there a reason why https://github.com/team-alembic/ash_authentication_phoenix and https://ash-hq.org/docs/guides/ash_authentication/3.7.3/tutorials/integrating-ash-authentication-and-phoenix#ashauthentication-phoenix-controller exist in parallel? I searched for the first one but didn't even expect that there was an other one.
With the first URL I mean the README which gets automatically displayed by GitHub.
https://ash-hq.org/docs/guides/ash_authentication/3.7.3/tutorials/integrating-ash-authentication-and-phoenix#ashauthentication-phoenix-controller says
ash_authentication_phoenix comes with a generator which creates a Phoenix.Controller by way of a use macro.
How can I use that generator? What's its name?
I have an understanding issue language wise with the following sentences: "If you haven’t already, read Getting Started with Ash Authentication . This provides a good primer on creating the required resources to use Ash Authentication with your Phoenix app."
Does this mean?
a) You must go through that other document and repeat all steps in it before doing the steps on this page?
b) It helps to understand the basics of the other document but we will show all needed steps here too?We should remove the getting started steps from readme and just point it at the tutorial.
And yes you need to go through the other one first
We can update the wording
The generator it refers to is the “use” block at the top of the controller. Will change that wording as well
I think perhaps this has been a source of confusion for people and I can only assume people must be going through the steps on the readme and not the steps on the tutorial, so hopefully removing that fixes the experience
I created a bug report related to this. https://github.com/ash-project/ash/issues/496
GitHub
Controller doesn't match to route in the "Getting Started With Ash ...
Describe the bug If I follow the Getting Started With Ash Authentication Phoenix tutorial I'll get the following bug when trying to access /sign-in The problem is that the route doesn&#...