Authorization on moodle embedded as iframe

Authorization on moodle embedded as iframe

by Anatol Myshkin -
Number of replies: 9

Hi,
I have moodle working in iframe, but I can't login into it - after Log in button action the pages just refreshes
(even with correct login and password). Login as a guest doesn't work too.
Without iframe (direct authorization on moodle site) all works well.
How can I solve this issue?
Both sites (moogle and where iframe is) are https.

Thanks!

Average of ratings: -
In reply to Anatol Myshkin

Re: Authorization on moodle embedded as iframe

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Have you tried with Debugging turned right up and/or checked your web server's error log (yes, I always say this)?
In reply to Howard Miller

Re: Authorization on moodle embedded as iframe

by Anatol Myshkin -
Thanks for the proposition, debug information under the page shows "You are not logged in." (after attempt of authorization from iframe)
In journal - Login failed for user '***'. Most likely the password did not match (error ID '3').

But same login and password were used for authorization - both directly and from iframe.
debug 
In reply to Anatol Myshkin

Re: Authorization on moodle embedded as iframe

by Anatol Myshkin -
Here is the true issue I think (from Chrome) -
A cookie associated with a cross-site resource at https://dream-grower.com/ was set without the `SameSite` attribute. It has been blocked, as Chrome now only delivers cookies with cross-site requests if they are set with `SameSite=None` and `Secure`.

Is it possible to configure SameSite=None in Moodle?

I think it is related to 
https://tracker.moodle.org/browse/MDL-67175
and 
https://github.com/moodle/moodle/compare/master...samhemelryk:MDL-67175/master/SameSite

But do you have an idea how it's possible to get authorisation working from within iframe?
In reply to Anatol Myshkin

Re: Authorization on moodle embedded as iframe

by Ramon Figueroa -
I have the same problem, did you got a solutions???

Thanks.
In reply to Ramon Figueroa

Re: Authorization on moodle embedded as iframe

by Vidish mishra -

I got the same issue, did you got the solution for this.

In reply to Vidish mishra

Re: Authorization on moodle embedded as iframe

by Ramon Figueroa -

Yes, if you upgrade to Moodle 3.8+ should work, fine. In Safari browser just need to tell your users that the need to change their security setting.

Thanks,

Ramon

In reply to Ramon Figueroa

Re: Authorization on moodle embedded as iframe

by Vidish mishra -

Thanks, Ramon for the reply.

This is resolved we have enabled the cookies in the IOS APP.

Regards,
Vidish