#My frustration is slowly getting over me and I'm on the verge of quitting everything

1 messages · Page 1 of 1 (latest)

errant cloak
#

I have decided to learn OAuth2 and try to implement it in to my project but as I'm trying to learn, nothing makes sense, I can't seam to understand how the backend and the frontend communicates with each other, and I'm slowly starting to realize that this isn't going to work, so I'm deciding to ditch the Angular frontend and use some template generator like Thymeleaf just to show of my backend skills. My question is, how difficult would it be to migrate Thymeleaf to an actual frontend like Angular in the future ?

crystal shoreBOT
#

<@&987246964494204979> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#

sense to me. I feel overwhelmed and discouraged. I don't know where to start or how to make progress. It's frustrating because I want to understand and succeed, but it feels like an impossible task. I'm losing motivation and questioning if it's even worth it to continue.

muted bridge
#

you are a single person, so definitionally you only do a single person's worth of work

#

so worst case, just as long as it takes you to do the thymeleaf version

#

best case, a lot less since you already did the UI and there is some stuff you can copy paste

errant cloak
muted bridge
#

come back when you are fresh

#

there is no reason to grind away

errant cloak
muted bridge
#

okay so "basic login, no provider" is the opposite of oauth

#

oauth is all about "log in with provider"

#

if you don't want that then things become a lot simpler

errant cloak
#

ok, let's ditch OAuth2, what do i use instead ? jwt ?

muted bridge
#

hmm

#

we can do either JWT or session auth

#

I would reccomend session auth TBH

#

so the way this would work is on your server, have a /login route

#

and we render a form on the page

#

classic web dev stuff

#

err

#

okay your options

#
  1. All angular, use JWTs for auth. Store JWT in local storage
#
  1. Mostly angular, have the login/register pages rendered in thymelleaf, store auth in session
#
  1. No angular, all thymeleaf, store auth in session
#

i'm not sure how to do All angular, store auth in session

#

since session stuff is stored in cookies, to set a cookie you need to make a post request through an http form (basically)

#

and the angular app wouldn't play nice with that

#

but you can just have a /login http route that returns a JWT

#

thats fine

errant cloak
#

When you refer to mostly angular, can't it just be all on angular instead of introducing thymeleaf ?

muted bridge
#

sure

#

i'm just not 100% sure the best way to use a session auth then

#

so JWT would probably be the easiest auth method

errant cloak
#

I think so too, for learning purposes it would be the best option, I actually had a JWT implementation already, but I deleted it all without fully understanding what OAuth2 is actually used for, and dumb me didn't have a backup on GitHub facepalm

#

This is relief honestly, thanks for the explanation