-
-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Problem
It seems ortie does not support query parameters in authorization endpoint URL. That prohibits getting a refresh token from Google.
But AFAIU Google requires additional parameters to enable refresh token support.
Where the issue occurs:
In src/auth/get.rs:80-81, ortie replaces the entire query string with default values
uri.set_query(Some(&request_params.to_form_url_encoded_string()));So even if I try to set
endpoints.authorization = "https://accounts.google.com/o/oauth2/auth?access_type=offline&prompt=consent"
those parameters get stripped away
But.... f
From https://developers.google.com/identity/protocols/oauth2/web-server:
The refresh token is only returned if your application set the
access_typeparameter toofflinein the initial request to Google's authorization server.
Additionally, if the user has previously authorized the application, you needprompt=consentto force re-authorization and receive a new refresh token.
I had claude code change the code to inject these extra query params via a toml configuration. It works for me (I now get a refresh token) but since it's all AI I rather not make that a PR.
Thoughts?