Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2384

Google OAuth2 in Android/iOS - disallowed_useragent ERROR

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_34_STABLE

      Description

      Running Moodle Mobile for Android and iOS and getting a "disallowed_useragent" error when the Moodle site authenticates with OAuth2 and Google. Example of the error message contained below with website URL redacted.

      BTW: Build is Moodle 3.4.1+ (Build: 20180308) - also, tried a different site with OAuth2 and was able to log in. This may be related to the way the authentication was configured, but still needs research.


      403. That’s an error.

      Error: disallowed_useragent

      This user-agent is not permitted to make an OAuth authorization request to Google as it is classified as an embedded user-agent (also known as a web-view). Per our policy, only browsers are permitted to make authorization requests to Google. We offer several libraries and samples for native apps to perform authorization requests in the browser.

      Learn more

      Request Details

      client_id=106309867406-l2msctbgn8l3cpeurdm289badl4nt3qb.apps.googleusercontent.com

      response_type=code

      redirect_uri=https://mysite.example.com/admin/oauth2callback.php

      state=/auth/oauth2/login.php?wantsurl=https%3A%2F%2Fmysite.example.com%2Fadmin%2Ftool%2Fmobile%2Flaunch.php%3Fservice%3Dmoodle_mobile_app%26amp%3Bpassport%3D226.4450515556806%26amp%3Burlscheme%3Dmoodlemobile&sesskey=5gWa6hdpZi&id=1

      scope=openid profile email

      That’s all we know.

        Attachments

          Activity

            People

            • Assignee:
              tallthom Thom Rawson
              Reporter:
              tallthom Thom Rawson
              Participants:
              Component watchers:
              Juan Leyva, Juan Leyva
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: