What I do is using Plugs.
The idea is when user get authenticated through the login page they will be redirected for example on a profile page (that you have to create yourself of course, but the following can works with the home page as well).
-
You need a Plug that ensures a profile exists for the current_user before accessing the above said page. If not, you redirect the user on a page where he will fill a form and complete his registration.
I’m used to call this page controllerMyApp.AccountController
orMyApp.ProfileController
. In fact I have often the both: the fisrt map toUser
schema and the last toProfile
schema. -
Now to load the profile into
@current_user
you can have a look to this reply that helped me.
I hope it helps a bit…