I am using google sign-in to log into my application. Where should I store the access token and refresh token? I have read in a few posts that it is not safe to store these tokens at front-end. This is the flow which I have read in most of the posts :
User clicks sign in with Google button and front end does all the authorization flow.
Front end sends the token to backend apis and backend apis validate it and does further user-related processing.
Now, My question is that if backend apis require token in every request, then front end must store it somewhere (which is not safe). And if I store tokens at backend, then how does front end communicate with back end in the subsequent requests?