AshAuthentication: Set return_to from LiveView redirect to login page
As said in the title, where/how do I set the
return_to
parameter in AshAuthentication?
If it's to be in the session, how do I set that in a liveview?
Code snippets will be helpful.3 Replies
Did you see the link https://ash-hq.org/docs/guides/ash_authentication_phoenix/latest/tutorials/getting-started-with-ash-authentication-phoenix#authcontroller ?
Ash HQ
Guide: Getting Started With Ash Authentication Phoenix
Read the "Getting Started With Ash Authentication Phoenix" guide on Ash HQ
It has a complete example of how to pass return_to parameter
Check https://ash-hq.org/docs/guides/ash_authentication_phoenix/latest/use-ash-authentication-with-liveview#liveuserauth where session is being passed to liveview. You can easily keep it in socket and reuse it when needed
Ash HQ
Guide: Use Ash Authentication With Liveview
Read the "Use Ash Authentication With Liveview" guide on Ash HQ