Byron / google-apis-rs

A binding and CLI generator for all Google APIs
http://byron.github.io/google-apis-rs
Other
1.02k stars 136 forks source link

Wrong redirect_uri #278

Closed inferrna closed 3 years ago

inferrna commented 3 years ago

I have provided

redirect_uris: vec!["http://localhost:8080".to_string(), "http://127.0.0.1:8080".to_string(), "http://127.0.0.1:46677".to_string()],

in my ApplicationSecret. But each time I run example code it generates url with random port, but not one from provided. _Please direct your browser to https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/analytics&access_type=offline&redirect_uri=http://127.0.0.1:42354&response_type=code&client_id=### and follow the instructions displayed there._ what means each time I have to go to credentials and add new uri to "Authorized redirect URIs". Same time googles own python example always using "http://localhost:8080".

Byron commented 3 years ago

Do you think this is a topic for yup-oauth2?

https://github.com/dermesser/yup-oauth2/blob/376de2aa8cf8808663faead6fc4f35b1bb53b17d/src/authenticator_delegate.rs#L123-L147

In case you believe this is not the case, it would be good to see how this relates to code coming from this API generator and have the issue reopened. You might also be interested in the async-google-apis which come with additional authentication examples.

Young-Flash commented 1 year ago

related to https://github.com/dermesser/yup-oauth2/issues/191