General help

Gmail Oauth2: Not Sending Linked Login Confirmation

 
Picture of Edilberto Solis, Jr.
Gmail Oauth2: Not Sending Linked Login Confirmation
 

Good afternoon guys,
I am using Oauth2
and in some cases after the first log-in that will send linked login confirmation in e-mail.

There's no email sent in the account.

And now, I am stucked with Account Pending Confirmation in every new account and I can't activate it because there's no e-mail for linked login confirmation sent for the said account.

 
Average of ratings: -
Picture of Ivica Matotek
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
Testers

Hi!

Go to Site administration -> Users -> Browse list of users -> Show more ->on Confirmed - pull down menu select No ->Add filter. Then you will search for users that didn't confirmed they account.

Ivica


 
Average of ratings: -
Picture of Edilberto Solis, Jr.
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
 

But the problem is that 


It doesnt send linked login confirmation in emails. 

For new acc and those pending.

It suddenly stops sending emails for linked login confirmation

 
Average of ratings: -
Picture of Ivica Matotek
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
Testers

Hi!

Sending mail it is complex problem. Your system didn't send emails or recipient didn't receive it, or did it put it in spam? What program do you use to send email? Can you send email to user with some other program (other than Moodle)?

 

Ivica

 

 
Average of ratings: -
Picture of Ken Task
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
Particularly helpful Moodlers

Working with an entity that's using CustomOauth2 with a private/corp identity management system (ie, not Google, Mircrosoft, Facebook.).

One of the 'features' to Oauth2 is linking to existing accounts.

https://docs.moodle.org/33/en/Linked_logins

The process evidently detects that an existing account is already using email address as username and as in the screen shot above the user is presented with an option/opporutunity to link existing account with the Oauth2 account.   Is that what you are referring to?

Observation so far ... and please check yourself ...

Query the mdl_auth_oauth2_linked_login table

select * from `mdl_auth_oauth2_linked_login`

See any entries with data in confirmtoken column and any data in confirmtokenexpires?

Also query your mdl_user table

select id,auth,username,firstname,lastname,email,from mdl_user where (`auth` like "oauth2")

Don't think you'll see the user who has not confirmed the linking of accounts.

Not meaning to piggy-back on your posting, but ...

If the accounts are linked, does that mean a user that opted to link them doesn't need to click on the Oauth2 button on the login page?   They can continue to use the 'normal' username/password dialog boxes above the Oauth2 login buttons?

As far as your issue, check your servers mail log or web server error logs.  If you are using the built in PHPMailer, it's likely that the receiving mail server did not accept the mail or has even rejected it thinking it's spam.   If you are using Postfix/Sendmail as the agent that sends, the mail log will/should contain an entry with a link provided by the rejecting mail server which gives it's reasons for rejection.   Can't tell you what to do there ... depends upon what it says.

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Edilberto Solis, Jr.
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
 

i don't have any manual accounts.

Accounts created using oauth2.


i am using  the built in PHP mailer

 
Average of ratings: -
Picture of Edilberto Solis, Jr.
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
 

Btw, it has been working for months


And then suddenly it stops sending linked login confirmation


I hope you can help me

My moodle is installed in

I am using EC2 instances and RDS for database.


I didn't change any of the settings in php or sql


 
Average of ratings: -
Picture of Ken Task
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
Particularly helpful Moodlers

@Edilberto

Uhhh ... I would hope you have at least one manual account .. that of the original admin user (the person who installed) ... and the other is 'guest' ... even if you are not using 'guest' logins.

What's is Amazon's policy on any outbound email from any of the EC2's?

You might need to setup SES https://aws.amazon.com/ses/ or SendGrid or other SMTP relay.

One doesn't need to change anything for email confirmations or mail from a Moodle sent by PHPMailer to 'suddenly' stop working.   More than likely it's not your Moodle nor the PHPMailer, but, rather, the other end and/or EC2's and Amazon network.  They don't want to become known as the next SpamKings haven.

Since Oauth2 is fairly new doesn't appear many have jumped on board.

Not sure you can fix from the Moodle Admin interface.   Suggest looking at

mdl_auth_oauth2_linked_login table.

There is a confirmtoken *and* a confirmtokenexpires field.

What if one removed the confirmtoken and the 'confirmtokenexpires' data?

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Edilberto Solis, Jr.
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
 

I tried creating a manual account then linked a gmail account and it's working


So the problem really is in Sending Linked Login Confirmation for oauth2 accounts.

It is working for months then it suddenly stop sending email

I did not change any config in AWS server or moodle configs.


 
Average of ratings: -
Picture of Edilberto Solis, Jr.
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
 

The server is currently live.

Will it cause any error if I delete the values on those fields?

 
Average of ratings: -
Picture of Edilberto Solis, Jr.
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
 

Update


I tried creating an oauth2 account

test.account

and when I checked the database. There's no account. 

 
Average of ratings: -
Me!
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

If you manually run cron does it report any errors?

 
Average of ratings: -
Me!
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

And do you see emails from other things in Moodle (forum notifications?)

 
Average of ratings: -
Picture of Edilberto Solis, Jr.
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
 

Not sending notifications haven't tried


How to test CRON?

 
Average of ratings: -
Me!
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
 
Average of ratings: -
Picture of Edilberto Solis, Jr.
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
 

If i delete my oauth2 services , planning to create new oauth2 services


Will it delete my current oauth2 users?

 
Average of ratings: -
Picture of Edilberto Solis, Jr.
Re: Gmail Oauth2: Not Sending Linked Login Confirmation
 

I am also experiencing issues with delayed submission.

My student will submit at days before the submission and will successfuly submit

But in the server it doesn't reflect on teacher's side.

 
Average of ratings: -