How do I use EasyAuth with a Frontend library? #49
-
I am building a project with FastAPI + VueJS + PostgreSQL. However I could not find in the documentation nor the articles published about this library on how to change the default login / registration / account activation / admin pages with a custom page made with VueJS or any other frontend library. Specifically I want to know if I can use this library with a frontend? If possible, how do I go about it? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @fugacityengr Short AnswerEasyAuth can absolutely be used with any other front-end library. Yes it will take a bit of work to re-create what has already been abstracted for you, and might require opening an issue from here to there to help improve a limitation you might have found. Long AnswerYou may or may not have scratched the surface of some of the near top of minds that I will be trying to improve upon in the near future. Before I delve into that, I want to make sure that I touch a few points. Unless someone wants or is able to come up with a better /admin page for the EasyAuthServer, that accomplishes the same, then I would not suggest re-inventing that wheel. This would also include the EasyAuthServer login page, which is really your portal into the admin of the framework. So the admin login page / path should really be left un-touched, but using a admin_prefix, that should never really effect usage of a frontend application running next to an EasyAuthServer. Upcoming ImprovementsI do think we can improve upon certain aspects of the automated redirection whenever there is an expired token or a request to a protected endpoint from an unauthorized user. The goal would be that an EasyAuthClient or EasyAuthServer could specify the '/path' that a host should be redirected to for obtaining a token : this might be a homepage or login portal. I think having the option to override certain /login /register /activation and error pages would be useful at some stage on an EasyAuthClient. I imagine creating an EasyAuthClient decorator that covers a method that generates or serves a specific page would make sense. That is my rant for now. I suggest building as much as you can, with the tools that are available, and if you get stuck, lets improve the framework to meet our needs. |
Beta Was this translation helpful? Give feedback.
Hello @fugacityengr
Short Answer
EasyAuth can absolutely be used with any other front-end library. Yes it will take a bit of work to re-create what has already been abstracted for you, and might require opening an issue from here to there to help improve a limitation you might have found.
Long Answer
You may or may not have scratched the surface of some of the near top of minds that I will be trying to improve upon in the near future. Before I delve into that, I want to make sure that I touch a few points. Unless someone wants or is able to come up with a better /admin page for the EasyAuthServer, that accomplishes the same, then I would not suggest re-inventing that wheel. This would als…