Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use programmatic_auth not possible #59

Closed
MTRNord opened this issue Apr 13, 2017 · 8 comments
Closed

Unable to use programmatic_auth not possible #59

MTRNord opened this issue Apr 13, 2017 · 8 comments

Comments

@MTRNord
Copy link

MTRNord commented Apr 13, 2017

Using programmatic_auth as auth_uri it failes to generate a correct URL.

redirect_uri and response_type aren't allowed but they get added using FlowType::InstalledInteractive.

Google says Parameter not allowed for this message type: redirect_uri and Parameter not allowed for this message type: response_type

also the scopes need to be devided by a + instead of spaces.

After that it would be nice to get the code which is in the cookie "oauth_token".

This is needed for generating the correct token for using the hangouts chat api (see hangups). Idea is to do automatic logins/auths. 100% from CLI

Did I miss something?

@dermesser
Copy link
Owner

I googled around for the programmatic_auth issue, it seems to be some known issue with the hangouts API (as described in the hangups issue #260). Please be advised that only APIs in https://github.com/Byron/google-apis-rs are supported. I wonder whether it might be easier for you to just do the HTTP requests yourself?

w.r.t. the scope divider, I fixed this.

@MTRNord
Copy link
Author

MTRNord commented Apr 18, 2017

Found that out too after that, Sadly I am stuck to googles page "Cookies are ot enabled" :/

@MTRNord MTRNord closed this as completed Apr 18, 2017
@dermesser
Copy link
Owner

oh, and I looked after the scope separation; the official documentation uses %20, not +: https://developers.google.com/identity/protocols/OAuth2InstalledApp

@MTRNord
Copy link
Author

MTRNord commented Apr 18, 2017

hm oh thats interesting because in there fromular on the login page they use a plus :/ Sorry for the missleading

@MTRNord
Copy link
Author

MTRNord commented Apr 23, 2017

@dermesser quick question. Is there a way to get the url that the dialog prints to a variable so that I can use that url in a request?

@MTRNord
Copy link
Author

MTRNord commented Apr 23, 2017

@dermesser basicly I mean how can I get the response of the build_authentication_request_url() function?

@dermesser
Copy link
Owner

if you really want to go that route, you can supply Authenticator::new() (https://github.com/dermesser/yup-oauth2/blob/master/src/authenticator.rs#L73) with a delegate (https://github.com/dermesser/yup-oauth2/blob/master/src/authenticator_delegate.rs#L62) that captures the verification_url.

@MTRNord
Copy link
Author

MTRNord commented Apr 26, 2017

Thanks. Reason is I have to use (sadly) programmatic_auth for hangouts because hangouts uses a oauth1.0 scope which is only allowed via programmatic_auth but I want still to use your crate :) so I have to intercept it a little bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants