Quantcast
Channel: Authentication
Viewing all articles
Browse latest Browse all 8256

Re: Google Authentication

$
0
0
by Ken Task.  

To be sure ... what version of moodle are you using?

IF, version 2.7/8, is what you are currently using this one:

https://moodle.org/plugins/view/auth_googleoauth2

https://github.com/mouneyrac/moodle-auth_googleoauth2/wiki

IF NOT, then forget the rest of this below ...

Now the question becomes, how are users set up in your school?
LDAP?  Other?

Have the above plugin installed on some public facing servers and I can confirm
it does indeed work, however ... it's not configured for an ISD Google Domain (Google for Schools domain).

*** BUT ... here's an idea ...

If one knows how it works in Moodle (the records it creates in Moodle and the data) one could 'cheat' and pre-populate Moodle mdl_user table with appropriate info initially.

The plugin linked above uses 'social_user_#' for the user name.  Knowing that, this example:

mysql> select id,auth,username,firstname,lastname,email from mdl_user where auth="googleoauth2";
+----+--------------+---------------+-----------+----------+-------------------+
| id | auth         | username      | firstname | lastname | email |
+----+--------------+---------------+-----------+----------+-------------------+
|  4 | googleoauth2 | social_user_1 | Ken       | Task (G) | mygmail@gmail.com |
+----+--------------+---------------+-----------+----------+-------------------+

One could, either create a spread sheet to use OR maybe even LDAP to generate a csv file to use to pre-populate Moodle (mdl_user) table. 

**The user table doesn't  contain a password - Google controls that.**

The ID number above would be auto incremented and the social_user_1 **would have to
increase by one** ... i.e., the second user would have username of social_user_2 when importing.   The (G) you see in my last name above was added after logging on
so I could tell which account I was using (am system admin).  Students and Teachers (NOT admin levels) wouldn't need the (G).

Have I done this?   Well, no , not really, but it should work ... am up to trying it with some data you provide on a 'tinker' site.   I can pre-populate the DB but cannot check to see if it works.   That would be your part.

PM me if interested.

'spirit of sharing', Ken




Viewing all articles
Browse latest Browse all 8256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>