Navneet Singh
Navneet Singh

Reputation: 1198

Google OAuth with username and password

I want to create Gmail email client in PHP similar to android/ios application where user fill username and password and perform operations like send/retrieve emails. I am already done with the Oauth - Web server applications where google provide access and refresh token to authenticate the user account. But I don't want user to be prompted for giving prevision to my application.

I checked something known as 2-factor authentication.Please let me know how is this possible ?

Upvotes: 2

Views: 3111

Answers (2)

Eric D
Eric D

Reputation: 7159

This is not possible with new Google authentication APIs as user's giving out their Google password to random developers/applications is considered a security risk http://googledevelopers.blogspot.com/2012/04/changes-to-deprecation-policies-and-api.html. Use oauth2 with a web flow and have the user authorize it. Then they don't have to expose their password and can always go and revoke the oauth2 grant if they want.

Upvotes: 3

lost in binary
lost in binary

Reputation: 562

You can try creating a service account. It doesnt require that the user enter his/hers password.

Upvotes: 0

Related Questions