How to create organization after user creation.
Ideally it would create organization for user after registration, but if user comes from invitation (to specific organization) than it does not create new one.
No functionality is created yet, im not sure, how to even approach this.
In user resource there isnt even actions for create. Apparently its definition happens somewhere in i suppose.
Sorry if i ask noob questions, i find docs rather confusing.
4 Replies
Yep! So you'll probably need to make some of your own actions to make these kinds of things work. You will also probably need to write your own sign in liveview for the accept invitation flow
You can attach behavior to the generated actions using the global changes
Then
actually yeah, use
before_action
🙂 will update the example
it will all happen in the same transaction
For accepting an invite, you'll likely need your own actions/routes/liveview, and create a user on your own. You'll end up getting familiar with actions/arguments/changes as part of that exercise 🙂Question about this is, how i possible could find by my self that action for it is
:register_with_password
?
Im a little bit confused about how to approach finding related parts.So thats one part documentation and one part "introspection"
the docs part is that it should say somewhere in the docs for
ash_authentication
that by default you get a register_with_<name>
action for each strategy
i.e register_with_password
comes from password :password do
the introspection part is that if you boot up iex
That will show each action and its typeThis is way late but just in case, this may help https://discord.com/channels/711271361523351632/1097619151029289131/1097939364065062983