yup-oauth2
yup-oauth2 copied to clipboard
Add a noninteractive authenticator
This pair of commits adds another authenticator, which is guaranteed to be non-interactive and just uses stored refresh tokens obtained from a previous authenticator. I want to use this in an offline job that I run periodically, which I build once using a helper binary to generate the NoninteractiveTokens
, and then can use repeatedly. This authenticator is simple and guaranteed to just error out if it can't provide tokens, instead of trying to do something interactive.
Hi, may I know if there is any follow up on this feature, or at least a temporary workaround?
Hi, may I know if there is any follow up on this feature, or at least a temporary workaround?
Good point, I'm sorry for not having come back to this. It looks like a useful addition, and I'd merge it once the conflicts are resolved!
Is there a difference between this NonInteractive
authenticator and an InstalledFlowAuthenticator
with a InstalledFlowDelegate
that always returns an error in InstalledFlowDelegate::present_user_url
?
Is there a difference between this
NonInteractive
authenticator and anInstalledFlowAuthenticator
with aInstalledFlowDelegate
that always returns an error inInstalledFlowDelegate::present_user_url
?
I think in principle it would have the same effect. I find this flow slightly more transparent and could see some use cases for this, even though the effect would be the same when using an appropriately implemented InstalledFlowDelegate.