Closed n2o closed 1 year ago
Hi @n2o , I will be more then happy to help out. Let me know how you would like to go about this - looking for plain vanilla thymeleaf frontend or possibly reactjs SPA with controller exposing rest api's. Let me know, thanks.
Hey, thanks for your interest. Yesterday @iTitus opened a pull request with the custom login page #21
I do not think, that we need reactjs, SPA or Rest APIs for this small project. This bloats the code and makes it less maintainable. Simplicity matters, especially in small projects like these ones ;-)
You can watch or star this repository. Maybe I will write more issues when there is something on my mind.
I didn’t add a login page but a landing page. This is still relevant
Hi, @iTitus @n2o I see that the application presents a admin login page. For this request, do we need a separate login page still? who will use the login page vs admin page?
If an unauthorized user tries to access /admin they will be redirected to /login by Spring Security. This page is still the default one provided by Spring Security. It needs some love!
When I wrote this issue, I was already thinking about modifying the login page in a way, that it does make it clear, that the user is visiting Shorty. @iTitus developed an admin-page, which is not really necessary in my opinion.
In my view we do not need a separate landing page and a modified login page. Having a modified login page with the ability to log into the application is sufficient. And the admin page can then get deleted.
We can merge the login form with the /
route.
When an unauthorized user tries to access /
it shows the landing page with a login form:
SHORTY
you need to be logged in as admin to create new short links
here is the login form:
form
When you are logged in and try to access /
then redirect to /admin
ok. @iTitus @n2o please check out this commit - let me know if this is something you guys looking for.
I forked over to my repo - https://github.com/chaudharydeepak/url-shortener/commit/5d77679a8903cd89702be0073a75f13a567a15bb
Hm seems not to be the idiomatic way. Please stick to the official spring documentation:
https://docs.spring.io/spring-security/site/docs/current/guides/html5/form-javaconfig.html
Also, please do not use own css – bootstrap.css is sufficient You find everything in the official documentation. I do not think that we need custom css. Let's just stick to bootstrap and we're done, happy and mobile ready.
The generic view of Spring Security looks a bit boring and we do not know, that this is the landing page of Shorty. We need a logo and a better landing page
/login
!