The best way is that the Cookies can be set from the server side. Cookies more Structurely backend developer can set from the server side. when user logged in token automatically set in the browser cookies. other try you can go with defining the domine name as a parameter while setting the cookies or you can go with local storage. Finally very advanced way is that you have to use the different storage type in production level.