Closed richardweinberger closed 1 year ago
https://github.com/google/gmail-oauth2-tools/blob/912b0c18fae21c07ec3c78ee58b6ba1e7a4e4f15/go/sendgmail/main.go#L98 states:
fmt.Println(authCodeURL + "&access_type=offline") // hack to obtain a refresh token
but all I get is an access token. Only when I add &prompt=consent too beside of the access token a refresh token is returned. Is this desired?
&prompt=consent
Many thanks for the report! It does indeed seem that prompt=consent is needed for consistently obtaining a refresh token.
prompt=consent
https://github.com/google/gmail-oauth2-tools/blob/912b0c18fae21c07ec3c78ee58b6ba1e7a4e4f15/go/sendgmail/main.go#L98 states:
fmt.Println(authCodeURL + "&access_type=offline") // hack to obtain a refresh token
but all I get is an access token. Only when I add
&prompt=consent
too beside of the access token a refresh token is returned. Is this desired?