How to check that cookies came in response to a cross-domain request?

0 like 0 dislike
81 views
Hi all.
Pile on the knee-authenticate from the frontend, right here is now time to implement jwt no.
The point is that I create a presentation authorization form through the FormData object and do a post request on the route for avtoriza with the setting withCredentials: true. All well and good, but the fact that the authorization was successful, I understand only because further requests to the API work as it should.
The question is, how can I track that cookies are established?
Now to change the state of the application me the idea to do an API query. Maybe there are other options?
asked by | 81 views

1 Answer

0 like 0 dislike
A million options.

If the cookie session/jwt not httpOnly, just looking at her. May wish to look at it before the query and after, and then compare.

Can do from the backend response to authorization "OK" / "not okay".

On the basis of further responses from the backend to understand, authorized or not.

The main thing — never a focus in the browser on claimi JWT like nbf, exp, because the client can be shot down time so that khendsheyk will have TLS, and all your schema updates will break. For example, will be off by 6 minutes when the validity of the token is 5 minutes.
answered by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Sep 23, 2018 by AlpineMilk
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
24,509 questions
45,931 answers
0 comments
257 users