I am trying to get fetch user\'s profile using Google OAuth2 api. After user authentication, on the consent page, I am always asked for \"Have Offline Access\"
Because you are redirecting back to http(s)://localhost:/. This makes sense because any app that requests redirection to localhost is obviously running locally.
Redirect it to a public web address and it will not bother you.