I have a web application where i have implemented delegated authentication via Google OIDC.(i.e. Browser redirects the users to google , they get authenticated and come back to my app). My app decodes the Google access and id tokens to authorize the user and things work fine.
I have another requirement where-in ,users of my application can access the APIs of my application using curl or other scripts. There will not be any browser interaction involved.I still want to rely on google to trust the the user is who she says she is.
One workflow I could think of is - User passes his Google ID and password while calling my API, my app will do password grant flow and get the token on user's behalf and use the token to validate API access.
However this is not practical since users will not be comfortable sharing their google credentials over curl with a third party app like mine.
What possible workflow could i use so that - User could get his id_token somehow via Google and passes it in the bearer token while calling my API. I can then validate the token. What are my options without any browser interaction?