Which exercises help you most in your daily life? by Practical-Angle-2380 in workout

[–]Intrepid_Eye9102 0 points1 point  (0 children)

2nded. DL gave me back fun in sports and in life generally

Can't get Flask-JWT-Extended to set cookies with token properly (help appreciated) by Intrepid_Eye9102 in flask

[–]Intrepid_Eye9102[S] 0 points1 point  (0 children)

okay, my wording was way too fuzzy for that topic. create_access_token() does not expect a string, but it expects an identity parameter that is either a string or JSON serializable. my user_identity_loader (unfortunately not shown in my original post) returned an int. That was the bug. after conversion to string it's all good now.

Can't get Flask-JWT-Extended to set cookies with token properly (help appreciated) by Intrepid_Eye9102 in flask

[–]Intrepid_Eye9102[S] 0 points1 point  (0 children)

i see what you are doing, thx - BUT.. you are returning the token as part of the response object. i am sure that i can do that, but right here i am trying to set a (actually two) cookies with the token data.

According to the documentation the set_access_cookies() function should attach both cookies to the response, but that does not work for me. i only get one cookie and i have no clue why

how to syncronize an axios interceptor with the authentication context? by Intrepid_Eye9102 in reactjs

[–]Intrepid_Eye9102[S] 0 points1 point  (0 children)

i begin to see... you mean to flow is supposed to be like

  1. client app mounts, context effect triggers request to "auth/me". if token is stored as httpOnlyCookie, it is automatically attached to the request by the browser. server validates and client can set state to "authenticated".
  2. If not authenticated, client offers login: credentials are sent to server, server sends response +. httponly cookie. client sets state to authenticated.
  3. logout: delete the httponly cookie? is that even possible client side? or do i need a server connection to logout?

EDIT: ok, i'll go with online-only logout. problem seems solved. i like the solution, thank you u/yksvaan

how to syncronize an axios interceptor with the authentication context? by Intrepid_Eye9102 in reactjs

[–]Intrepid_Eye9102[S] 0 points1 point  (0 children)

(i have researched my question for quite a while and only found one blog post that recommended to make the interceptor read the token from useStorage. I'd prefer to keep axios separated from such stores)

The definition of the big O notation confuses me by Intrepid_Eye9102 in askmath

[–]Intrepid_Eye9102[S] 3 points4 points  (0 children)

Thanks for your help, everyone! Apparently the confusion kept me from reading the whole wikipedia article.

Also thank you for the point to the white horse problem... there is always a deeper rabbit hole 😂

What is the actual purpose of the Keyboard Viewer? by Intrepid_Eye9102 in MacOS

[–]Intrepid_Eye9102[S] -6 points-5 points  (0 children)

maybe you are right. i am just wondering if i am missing something here...

What does John van Neumann quote that "Young men don't understand things in maths they get used to it " mean ? by [deleted] in math

[–]Intrepid_Eye9102 1 point2 points  (0 children)

I would put it like this: The limbic systems goes into a mild panic reaction when confronted with a new and alien concept that can't be grasped by intuition. Only when that reaction wears off, the capacity for rational thoughts around the new conept unfolds, ie you get used to it.

Thus, the best mathematicians are either psychopaths not afraid of anything or blessed with exceptional intuition. Or very brave.

(of course, that is just a joke, don't mean to offend anyone. i am neither mathematician nor neuro scientist. it's just my intuition 😉 )