Authentication necessity check function based on cache
- Dominant language
- Go
- Stars
- 737
- Forks
- 95
- Avg merge
- 10h 38m
- Merged PRs (30d)
- 2
Description
I would like to write a script in which oauth2l is used. In the script I'd like to write conditional codes depending on authentication necessity (I mean, whether it is necessary to open the consent page on a browser or not). Currently oauth2l doesn't provide such a function and if you want to know whether it is necessary you have to run:
```sh
oauth2l fetch --scope --cache /path/to/cache --credentials /path/to/credentials.json
```
and see whether this message comes up:
```sh
Go to the following link in your browser:
https://accounts.google.com/o/oauth2/auth?......
```
This is inconvenient when embedding oauth2l in scripts. I would like oauth2l to provide a function which checks authentication necessity based on cache. Sadly you don't seem to be able to extract token from cache, so `oauth2l test` command doesn't help.
Contributor guide
Assessment
This issue has not been assessed yet.