For the past week, I have been trying to access Gmail api but it seems impossible. It's do-able in web app but for installable app, no luck. I have used about all plug ins there is and read through all the documentation. I also understand how to do it with http request but then I gotta manually use refresh token which is definitely not the right thing to do.
With the use of various packages, I can get to the point where I get the Authorization code but when I close the web view window, I get errors. Every road seems blocked for me. There isn't enough answers on stack overflow either.
Here is what I've done so far:
I used google api and googleapi auth package to sign in. It gives a signin URL for user consent which is successful in a browser but then it returns a authentication code in the url in the browser and there is no answer where in the package I can use the code to get access token.
I used Google sign in package but it definitely useless because I'm not trying to get public profiles but access token. It gives me error, says I don't have permission.
I used simple auth and oauth2 client package but just like no. 1, I have nowhere to put Authorization code after user consent. I'm slowly loosing all hopes, it's for Android app btw