Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Admin SDK [Directory - API] check User password

I am using Google Admin SDK Directory API to create users and using Service account I am able to perform CRUD operations on them.

I have a requirement whereby I have to check the credentials of users created using SDK. When you fetch the users the password is not returned, hence comparison cannot be done.

I'll really appreciate if someone lets me know what would be effective way of approaching the checkCredentials function.

Thanks.

like image 229
baba.kabira Avatar asked Oct 23 '25 23:10

baba.kabira


1 Answers

Google does not ever return the value of the password. That would be a monumental security risk.

See their documentation in regards to the user resource used in the directory API. It specifically states that the password field is never returned. It can only be used for setting the password.

If your requirement is too check creds on a newly created user, you should look into trying to login as the user with the password you just sent, using the google auth Apis

like image 117
Joseph Alcorn Avatar answered Oct 26 '25 21:10

Joseph Alcorn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!