You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.
First-time token generation
var provider = new GoogleCloudPrintOAuth2Provider(clientId, clientSecret);
// You should have your redirect uri here if your app is a server application, o.w. leaving blank is ok
var url = provider.BuildAuthorizationUrl(redirectUri);
/* Your method to retrieve authorization code from the above url */
var token = await provider.GenerateRefreshTokenAsync(authorizationCode, redirectUri);
this can't be right can it? the var url is not used in the call which says, "Your method to retrieve authorization code from the above url"
The text was updated successfully, but these errors were encountered:
Yes, it's correct. It took me a long time to figure this out. You can test it out by putting a beak point in the line 'var token ....' as follows:
Enter the value of url into a browser. Sign into the GMail account owning the printers, if you have not done that already in your browser. Accept using the account, and you'll go to a page where the authorization code is in the URL window. Then copy and paste the code and assign it to the variable authorizationCode.
I did this programmatically with a Windows Forms application. I used Process.Start(url) to bring up the browser. I followed that line of code with the display of a form where I pasted in the authorization code.
Currently, I'm trying to do the same thing with a Web application and getting stuck at the point of trying to pop up a new browser instance. If you happen to know how to do that, please let me know.
@awerber do you do any freelance work by chance? I can't get this working, so hoping to outsource it to someone--ideally someone with relevant experience like yourself!
I've never freelanced before. I work full time for a company, and I wrote all the GCP code while an employee. I can check with my supervisor about the rules related to this situation.
In the meanwhile, can you describe the nature of your project and the type of business use (or uses) for this functionality?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
from the docs
this can't be right can it? the var url is not used in the call which says, "Your method to retrieve authorization code from the above url"
The text was updated successfully, but these errors were encountered: