Since access token is vulnerable to XSS
and Cookies are vulnerable to CSRF.
is it possible to have a solution of both (Access token and session cookie).
My point is, to generate a random string called X, and store it in access token and session cookie, so when a request to a resource is done, the server side will make sure that the string in cookie and token is the same.
in this case we are eliminating the individual XSS and CSRF attacks.
does this solution more secure than token-based and cookie-based authentication?
and is there any critical vulnerabilities in it?
if there would be any enhancements, please suggest.