I followed a tutorial on setting up an auth system, using JWT, and a simple oauth2.
at some point, at the tutorial he started using Vit/React for the front end. and that’s where we separated ways xD.
I wanna use a simple html/css code for now.
My problem is I can’t get the views and my html to be fully compatible, and even if I get it working the redirections don’t work at all.
basically let’s say I registered successfully, I would either render http://127.0.0.1:8000/api/v1/auth/register with debugs
and if I get the redirection to work properly I would get redirected to http://127.0.0.1:8000/api/v1/auth/login/ instead of domain/login
at some point I got it to work, from signup to verification to login
but my code was quite messy and I used a lot of js to get the result, mean while in the tutorial where he used React, he just routed the views through urls.py to his React routes !
so that’s when I was like, am sure there is gonna be a way where I shouldn’t use a lot of js scripts just to get me to redirect from sign up to verification to login !
I reverted back to my initial code and made a public repo :
https://github.com/bekri/pt_lancer
PS: I smoothly wanna render my views in html pages!
Thanks a lot !
I tried redirection through js scripts in the html, and tried redirection through the views but they would redirect me to http://127.0.0.1:8000/api/v1/auth/name/
Zakariae Bekri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.