How to create custom login route in Spring?

Like I want to have a custom frontend, therefore I need /auth/signin sort of route, but I'm not sure how should I implement it, any idea how can I do so?
11 Replies
JavaBot
JavaBot2mo ago
This post has been reserved for your question.
Hey @Koblížkáč! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Mandagus Šernas
autowire AuthenticationManager, apply it with UsernamePasswordAuthentication object you create from request parameters, set the result into spring security context, something along those lines that said you don't need to create custom endpoint, you can just use the already provided /login, it doesn't force you to use thymeleaf or anything you can post to /login from any spa framework
JavaBot
JavaBot2mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Koblížkáč
KoblížkáčOP4w ago
hmm really? i didnt know that
Mandagus Šernas
I mean, how do you think the mpa form thing works? It just hits a POST request. You can run same POST request from js fetch
JavaBot
JavaBot4w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Koblížkáč
KoblížkáčOP4w ago
oh wow thats true, but can i disable the form only then?
JavaBot
JavaBot4w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
saj
saj4w ago
Yes I can help you
Koblížkáč
KoblížkáčOP4w ago
go on
JavaBot
JavaBot4w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?