Moodle

Google and Yahoo account authentication api

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.8
  • Fix Version/s: None
  • Component/s: Authentication
  • Labels:
    None
  • Environment:
    ALL
  • Database:
    Any
  • Affected Branches:
    MOODLE_18_STABLE

Description

1) Provides ability to Moodle to use Google/Yahoo Accounts for creating new users with instant activation.
2) Uses Google/Yahoo Accounts to log in.

Future Possibilities
1) Replacing Moodle calendar with Google calendar
2) Allowing other Google/Yahoo gadgets/utilities to be used by Google.

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

This has nothing to do with the Book module has it?

Show
Martin Dougiamas added a comment - This has nothing to do with the Book module has it?
Hide
jai gupta added a comment -

no, it is a new module, I don't really know if it should be called a module or not but I leave that on experts like you.

it will add a functionality to moodle's user authentication method. In place of Email-based authentication the users may be verified by using Google's or Yahoo's account.
Googles or Yahoo's account authentication will only be used to verify there account, other stuff in profile etc will come from moodle's database.

see: http://code.google.com/apis/accounts/Authentication.html
and http://developer.yahoo.com/auth/

Show
jai gupta added a comment - no, it is a new module, I don't really know if it should be called a module or not but I leave that on experts like you. it will add a functionality to moodle's user authentication method. In place of Email-based authentication the users may be verified by using Google's or Yahoo's account. Googles or Yahoo's account authentication will only be used to verify there account, other stuff in profile etc will come from moodle's database. see: http://code.google.com/apis/accounts/Authentication.html and http://developer.yahoo.com/auth/
Hide
Edward Hewlett added a comment -

We use Google Apps for Your Domain to provide our students with e-mail accounts - it would be handy to be able to synchronize/coordinate the creation of e-mail and Moodle accounts!

Show
Edward Hewlett added a comment - We use Google Apps for Your Domain to provide our students with e-mail accounts - it would be handy to be able to synchronize/coordinate the creation of e-mail and Moodle accounts!
Hide
Lorenzo Nicora added a comment -

Google account authentication API cannot be used as authentication for Moodle (a Single Sign-on between Google and Moodle) as it does not pass back the user identity or anything Moodle can use to identify user.
It only pass back a random token usable to call other Google services from within the webapp.

Read the last paragraph of the specs page: http://code.google.com/apis/accounts/AuthForWebApps.html
It explicitly says you cannot do it (for now).

Show
Lorenzo Nicora added a comment - Google account authentication API cannot be used as authentication for Moodle (a Single Sign-on between Google and Moodle) as it does not pass back the user identity or anything Moodle can use to identify user. It only pass back a random token usable to call other Google services from within the webapp. Read the last paragraph of the specs page: http://code.google.com/apis/accounts/AuthForWebApps.html It explicitly says you cannot do it (for now).
Hide
jai gupta added a comment -

yes, for now we can't enjoy 'Single Sign-on' but what we can do is still use it for creating new users and for user authentication...

when we get a token (after a user uses correct username/password) then we can easily get access to users public info like, name, country etc...

now, if the user is new for moodle it will create a profile and store it in database... if the user is existing then it will issue an session...

The idea is that we wont need to verify a user by sending him a email... moodle database wont store password... the user will have same userrname as for his google account.

Show
jai gupta added a comment - yes, for now we can't enjoy 'Single Sign-on' but what we can do is still use it for creating new users and for user authentication... when we get a token (after a user uses correct username/password) then we can easily get access to users public info like, name, country etc... now, if the user is new for moodle it will create a profile and store it in database... if the user is existing then it will issue an session... The idea is that we wont need to verify a user by sending him a email... moodle database wont store password... the user will have same userrname as for his google account.
Hide
Tony Hall added a comment -

I have created a module that does this... it can be downloaded from http://itvet.org/googaps/ and it has been added to the module database.

Show
Tony Hall added a comment - I have created a module that does this... it can be downloaded from http://itvet.org/googaps/ and it has been added to the module database.
Hide
jai gupta added a comment -

Tony Hall, Your module is interesting but it will work only for Google apps but my Idea was to use Google's account for authentication this way any user having a Google account or Gmail account can simply login without registration.

In Google apps students still needs to be registered & free version of Google apps does not allow registration API (this means the students needs to be registered manually).

Show
jai gupta added a comment - Tony Hall, Your module is interesting but it will work only for Google apps but my Idea was to use Google's account for authentication this way any user having a Google account or Gmail account can simply login without registration. In Google apps students still needs to be registered & free version of Google apps does not allow registration API (this means the students needs to be registered manually).
Hide
Tony Hall added a comment - - edited

My module could be used for any google hosted account... the authentication string would just need to be changed.

Where I have the $var variable setting the 'accountType=HOSTED' it would simply need to be changed to 'accountType=HOSTED_OR_GOOGLE' However this would allow anyone using any google account (gmail or otherwise) to authenticate... you can test this by using the following url and replace the yourusername and yourpassword with your google account details...

https://www.google.com/accounts/ClientLogin?accountType=HOSTED_OR_GOOGLE&Email=yourusername@gmail.com&Passwd=yourpassword&service=xapi&source=itvet-moodle-1.8

You should be returned a token for SID, LSID and Auth on a successful authentication

Show
Tony Hall added a comment - - edited My module could be used for any google hosted account... the authentication string would just need to be changed. Where I have the $var variable setting the 'accountType=HOSTED' it would simply need to be changed to 'accountType=HOSTED_OR_GOOGLE' However this would allow anyone using any google account (gmail or otherwise) to authenticate... you can test this by using the following url and replace the yourusername and yourpassword with your google account details... https://www.google.com/accounts/ClientLogin?accountType=HOSTED_OR_GOOGLE&Email=yourusername@gmail.com&Passwd=yourpassword&service=xapi&source=itvet-moodle-1.8 You should be returned a token for SID, LSID and Auth on a successful authentication
Hide
jai gupta added a comment -

Somehow it is not working on my setup.

Don't I have to submit the same to https://www.google.com/accounts/AuthSubRequest?

If you have working code which works with gmail then can you upload it as attachment?

Show
jai gupta added a comment - Somehow it is not working on my setup. Don't I have to submit the same to https://www.google.com/accounts/AuthSubRequest? If you have working code which works with gmail then can you upload it as attachment?
Hide
jai gupta added a comment -

yes, the code is working... thanks a lot.

Show
jai gupta added a comment - yes, the code is working... thanks a lot.
Hide
Tony Hall added a comment -

I have come across another issue...

On occasion (when many students attempt to login using the one IP, like through our proxy server google responds wanting a captcha confirmation for the account) which leads to my code failing.

I have removed the module from the moodle database until I can fix this problem, but am currently stumped on how to do a 2nd stage authentication with moodle using a google captcha image only when required.

Maybe I have to change the module to use it's own custom authentication page which has a captcha image on it... Got any other ideas?

Show
Tony Hall added a comment - I have come across another issue... On occasion (when many students attempt to login using the one IP, like through our proxy server google responds wanting a captcha confirmation for the account) which leads to my code failing. I have removed the module from the moodle database until I can fix this problem, but am currently stumped on how to do a 2nd stage authentication with moodle using a google captcha image only when required. Maybe I have to change the module to use it's own custom authentication page which has a captcha image on it... Got any other ideas?
Hide
jai gupta added a comment -

How about creating a login block? This login box may contain captcha + error handling + some custom text.

One more thing, when user logs in with this cool module, he uses his email, can we somehow store this email in database (email filed) and then make email files as locked when user edits his profile. We may not want that user uses incorrect email in his profile.

This would be big, can we fetch info like first name, last name, state, country from Google?

Show
jai gupta added a comment - How about creating a login block? This login box may contain captcha + error handling + some custom text. One more thing, when user logs in with this cool module, he uses his email, can we somehow store this email in database (email filed) and then make email files as locked when user edits his profile. We may not want that user uses incorrect email in his profile. This would be big, can we fetch info like first name, last name, state, country from Google?
Hide
Tony Hall added a comment -

I have tried a few things with the authentication module and have re-released it as a beta version with some attempts to allow the user to use a captcha to unlock their google account.

The new version can be downloaded from http://itvet.org/googaps/

Please try it in non production environments and let me know how it goes by using the contact form on my site.

Show
Tony Hall added a comment - I have tried a few things with the authentication module and have re-released it as a beta version with some attempts to allow the user to use a captcha to unlock their google account. The new version can be downloaded from http://itvet.org/googaps/ Please try it in non production environments and let me know how it goes by using the contact form on my site.
Hide
prasad added a comment -

Hi Guys, I need a help.

Do anyone have a sample in C# for using gmail or yahoo id to sigin with google and yahoo API?

Show
prasad added a comment - Hi Guys, I need a help. Do anyone have a sample in C# for using gmail or yahoo id to sigin with google and yahoo API?
Hide
prasad added a comment -

Hi, I have found the answer for sign in using google account. Its explained in www.dotnetethics.com.

Show
prasad added a comment - Hi, I have found the answer for sign in using google account. Its explained in www.dotnetethics.com.

People

Vote (2)
Watch (5)

Dates

  • Created:
    Updated: