Predrag Petrovic
Predrag Petrovic

Reputation: 17

3-legged OAuth for Google API console app?

I've been playing around, and created simple console app in C# that reads my gmail inbox, searches for email from the gym, and if I've scheduled group training and got the response email, creates google reminder. When I ran the app in local all works fine.

But I want to deploy it to Azure and created WebJob, and that is where the problems start. Locally I get pop-up window where I give app permission, but I cannot to that in WebJob. Than I created a service account, but I cannot enable domain-wide authority to the service account because I do not have G Suite, I use regular gmail. What are my options here? I've been reading and OAuth 2.0 Three legged implementation seems like the way to go?

Upvotes: 0

Views: 334

Answers (1)

nvnagr
nvnagr

Reputation: 2063

If you are trying to have this app just for your gmail inbox then you can get a refresh token (locally for your app) and just hardcode that in your app.

If you want to make this app for other users then you'll have to do a lot more work and apply for app verification and implement 3 legged auth.

Upvotes: 1

Related Questions